Question

I have table with one field:

Postal
48016350
48016350
48016350
48016350
48016350

I need to add "0" before each record and add "-"(dash) after 5th character in my MsAccess 2000 database.

My goal is:

Postal
04801-6350
04801-6350
04801-6350
04801-6350
04801-6350

Thank you for help.

Was it helpful?

Solution

You can do this with an update query:

UPDATE table
SET postal = "0" & Left(postal,4) & "-" & Right(postal,4)

You can paste the SQL into SQL View of the Query Design window. Make sure you make a copy of the table first.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top