Turning 2 fields of data into 1

mkdrep

Registered User.
Local time
Today, 03:42
Joined
Feb 6, 2014
Messages
181
I have a table in a database where the telephone numbers are in two separate fields, i.e. [123] (which is the areacode) and [456-7899]. Is there a way to take the two fields in this table and put combine these two numbers into one field so the new field will be in this format.... [123-456-7899]?
thank you
 
You do not have to do that, when and where needed you can make a new column in Query. There is absolute no need to update them in the main table.
 
When doing it in a query and you wish to combine them:
Code:
SELECT (area_code & "-" & phone_number) AS [Phone Number]
FROM [table]
WHERE [condition](s)
 
When doing it in a query and you wish to combine them:
Code:
SELECT (area_code & "-" & phone_number) AS [Phone Number]
FROM [table]
WHERE [condition](s)

My reason for doing this is that another table has telephone numbers in the [123-456-7899] format that I want to import into the first table.
 
just put Left(phone, 3) into area and Mid(phone, 4) into phone number
 
I will expand on the issue....I one table in a database where the telephone numbers are in two separate fields, i.e. [123] (which is the areacode) and [456-7899]. I want take the two fields in this table and combine these two numbers into one field so the new field will be in this format.... [123-456-7899]? the reason for doing this is that a second table in the same database already has the telephone data in the [123-456-7899] format and I want to import the second table into the first table. I think I may just download the first table into an Excel spreadsheet and combine the info there and reimport it into Access....
 
Well thats exactly what I just explained to you. you can combine and rip separate data right within the Insert query.
 
Well thats exactly what I just explained to you. you can combine and rip separate data right within the Insert query.

Sorry....I guess the internet works too fast sometimes! I was reading one of your replies when the others came thru I guess! lol
Thanks very much for your help!
 

Users who are viewing this thread

Back
Top Bottom