Separating mobile numbers

  • Thread starter Thread starter Ramesh
  • Start date Start date
R

Ramesh

Hi,

Fixed line numbers and mobile numbers have been wrongly entered in the same
field. Can i run some query which will move all the mobile numbers (numbers
starting with 9) to a separate field?

Thanks
Ramesh
 
Hi Ramesh

One way would be to create a new field in the table (call it MobileNumber)
then run an update query to copy to number starting with 9 into this new field

UPDATE TableName SET TableName.MobileNumber = TableName!PhoneNumber
WHERE (((TableName.PhoneNumber) Like "9*"));

After this (IF you are happy with the results) run a delete query to get rid
of the numbers that start with 9 from the phone number field.

DELETE TableName.PhoneNumber
FROM TableName
WHERE (((TableName.PhoneNumber) Like "9*"));


I would do all this on a copy of the table 1st - just in case ??
 
Thanks a ton Wayne.

Ramesh

Wayne-I-M said:
Hi Ramesh

One way would be to create a new field in the table (call it MobileNumber)
then run an update query to copy to number starting with 9 into this new
field

UPDATE TableName SET TableName.MobileNumber = TableName!PhoneNumber
WHERE (((TableName.PhoneNumber) Like "9*"));

After this (IF you are happy with the results) run a delete query to get
rid
of the numbers that start with 9 from the phone number field.

DELETE TableName.PhoneNumber
FROM TableName
WHERE (((TableName.PhoneNumber) Like "9*"));


I would do all this on a copy of the table 1st - just in case ??
 

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


Back
Top