Query guru need I think

A

Alex H

Hi

I need to format some telephone numbvers that are in a text field.
They are in 3 formats
+41 (012) 1234567
+41 (0123) 123456
+41 (0123) 12345

I need to reformat these so that I get rid of the +44, both brackets, and
that there is a space between the 4th and fifth character.

Can someone point me in direction of best way to tackle this please

thanks

A
 
P

PC Datasheet

Look at the following functions in the Help file:
Len
Left
Mid
Right
InStr
 
G

George Nicholson

2 Update queries:

1)
UPDATE [tblTest] SET [tblTest].Field1 = Replace([Field1],"+41 (","");
or, if you just want to remove the 1st 5 characters regardless of their
values:
UPDATE [tblTest] SET [tblTest].Field1 = Mid(6,[Field1],Len([Field1)-5);

2)
UPDATE [tblTest] SET [tblTest].Field1 = Replace([Field1],")","");

Make copies and test the results!
 

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