E
excelCPA
I have two tables, both contain data by policy numbers. Some policy
numbers are entirely numeric some contain alpha characters. The first
table contains leading zeros for numeric policy numbers and the number
of leading zeros is not fixed, it varies by policy. The second table
has no leading zeros for numeric policy numbers. Both are linked
tables and are "text" type fields.
How do I make a join in a select query that will ignore leading zeros
for policies that are all numeric, while still allowing for polices
that contain alpha characters?
For example:
Tbl1 Tbl2
Policy # PolicyNum PaymentReceived
0001234 1234 100
02345 3456 80
W78QR7 W78QR7 200
Below is my select query:
SELECT [Tbl1].[Policy #], Tbl2.PaymentReceived,
FROM [Tbl1] INNER JOIN Tbl2 ON [Tbl1].[Policy #] = Tbl2.PolicyNum;
numbers are entirely numeric some contain alpha characters. The first
table contains leading zeros for numeric policy numbers and the number
of leading zeros is not fixed, it varies by policy. The second table
has no leading zeros for numeric policy numbers. Both are linked
tables and are "text" type fields.
How do I make a join in a select query that will ignore leading zeros
for policies that are all numeric, while still allowing for polices
that contain alpha characters?
For example:
Tbl1 Tbl2
Policy # PolicyNum PaymentReceived
0001234 1234 100
02345 3456 80
W78QR7 W78QR7 200
Below is my select query:
SELECT [Tbl1].[Policy #], Tbl2.PaymentReceived,
FROM [Tbl1] INNER JOIN Tbl2 ON [Tbl1].[Policy #] = Tbl2.PolicyNum;