Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format data already in a table

Status
Not open for further replies.

barra47

Programmer
Dec 25, 2002
86
AU
I have a table with about 1000 contact names and details

The PhoneMo field has numbers eneterd as 0812345678

I want to alter the data so that it reads 08 1234 5678
Is this possible

Thanks in advance
 
UPDATE yourTable
SET PhoneMo=Left(PhoneMo,2) & ' ' & Mid(PhoneMo,3,4) & ' ' & Right(PhoneMo,4)
WHERE Len(PhoneMo)=10

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks PH

That worked a treat
saved me a lot of work
Excellent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top