Matching Tables

A

Alicia

I have 1 table that has a number: 11-22-3333.
Another table has the same number in a different format: 11223333

Is there a formula that I can build into the query to reformat one of these
numbers to look like the other so I can match up additional data?
 
B

Brendan Reynolds

You can use the Replace() function to replace the hyphens with nothing ...

? replace("123-456-789","-","")
123456789
 
O

Ofer

Assuming that the format of the field is always "##-##-####"
then you can create a query based on the first table with the unformatted
field
"Select format([MyField],"##-##-####") as aaa from MyTable"

then create another query where you can join the second table with the query
you created above.
 
A

Alicia

You are my hero!

Brendan Reynolds said:
You can use the Replace() function to replace the hyphens with nothing ...

? replace("123-456-789","-","")
123456789
 
Top