Matching Tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
You can use the Replace() function to replace the hyphens with nothing ...

? replace("123-456-789","-","")
123456789
 
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.
 
You are my hero!

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

table joins 1
Telephone number format in Query 6
Reformatting formula 2
phone 1
Merge 2 tables with conditions 2
access joins 1
JOins pls help 4
Search by product & alsoshow other products purchased by same cust 2

Back
Top