SQL Query Statement to concatenate areacode + 7-digit phone#

G

Guest

I have a database of do not call phone numbers where the area code is in one
field {area_code} and the 7-digit phone number is in another field {phone}.
I need to concate the two into one field {telephone} so I can run a matching
& non-matching records query against a calling list where the phone number is
the full 10-digits. I've tried to use the concatenate function but I'm
getting errors and I'm at a loss. The name of my table is 011011_CA_DNC.
 
J

Jeff Boyce

If you were working in the design view of a query, you could put something
like:

Combined: [Area_Code] & [Phone]
or
Combined: [Area_Code] & " " & [Phone]

in one of the "fields" in the design grid.

If you are working directly in the SQL expression, you should be able to do
something similar, using the "As XXXX" clause (check Access HELP).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Thanks, I was able to get it to work. Your help and time is much appreciated!
--
Thanks, SP


Jeff Boyce said:
If you were working in the design view of a query, you could put something
like:

Combined: [Area_Code] & [Phone]
or
Combined: [Area_Code] & " " & [Phone]

in one of the "fields" in the design grid.

If you are working directly in the SQL expression, you should be able to do
something similar, using the "As XXXX" clause (check Access HELP).

Regards

Jeff Boyce
Microsoft Office/Access MVP

Jecsen said:
I have a database of do not call phone numbers where the area code is in
one
field {area_code} and the 7-digit phone number is in another field
{phone}.
I need to concate the two into one field {telephone} so I can run a
matching
& non-matching records query against a calling list where the phone number
is
the full 10-digits. I've tried to use the concatenate function but I'm
getting errors and I'm at a loss. The name of my table is 011011_CA_DNC.
 

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

Top