Updating exchange number using Update query

  • Thread starter Thread starter alexn via AccessMonster.com
  • Start date Start date
A

alexn via AccessMonster.com

Hello - I want to make an Update query to change the exchange numbers in a
phone number, as in (555) 555-1212 to (555) 444-1212

I believe the Criteria should be Left([PhoneNumber],9)=" (555) 555"

but I'm stuck on the update part...

Update to: "444"+Right([PhoneNumber],9)

not happenning...
 
alexn said:
Hello - I want to make an Update query to change the exchange numbers in a
phone number, as in (555) 555-1212 to (555) 444-1212

I believe the Criteria should be Left([PhoneNumber],9)=" (555) 555"

but I'm stuck on the update part...

Update to: "444"+Right([PhoneNumber],9)


Update to: "(555) 444" & Right([PhoneNumber], 4)
 
Just to clairfy:
1) the number is stored in the database as a string as in (111) 555-1212 as
opposed to being stored as a number like 1115551212

Either you want:
Update to: "(444)" & Right([PhoneNumber],9)
To give you (444) 555-1212
or
Update to: left([PhoneNumber],) "444" & Right([PhoneNumber],5)
To give you (555) 444-1212

You use the & operatore to concatinate strings/Text
HTH
Hafeez Esmail
 
Thanks!!

Hafeez said:
Just to clairfy:
1) the number is stored in the database as a string as in (111) 555-1212 as
opposed to being stored as a number like 1115551212

Either you want:
Update to: "(444)" & Right([PhoneNumber],9)
To give you (444) 555-1212
or
Update to: left([PhoneNumber],) "444" & Right([PhoneNumber],5)
To give you (555) 444-1212

You use the & operatore to concatinate strings/Text
HTH
Hafeez Esmail
Hello - I want to make an Update query to change the exchange numbers in a
phone number, as in (555) 555-1212 to (555) 444-1212
[quoted text clipped - 6 lines]
not happenning...
 

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

Back
Top