How do I remove a space from the start 3000+ records

W

westkris

I have got a database with over 300 records, one of the fields has a space
before all to the records. I need to remove the spaces. What is the best way
to do this as I don't want to have to sit and manually go through over 300
records?
 
D

Dennis

Create an update query and select the one field in question only.
(In my example, my field is called spacefield)
In the update to row of the query put
Mid([spacefield],2)
(Take a copy of your table as a backup before you start just in case.)
 
J

John Vinson

I have got a database with over 300 records, one of the fields has a space
before all to the records. I need to remove the spaces. What is the best way
to do this as I don't want to have to sit and manually go through over 300
records?

Create an Update query based on your table, and update this field -
which I'll assume is named MyField - to

Trim([MyField])

The square brackets are essential - if you update to Trim(Myfield)
you'll get "Myfield" in every record!

John W. Vinson[MVP]
 
Top