deleting a blank

J

Johnny Bright

Hi there.

One of my fields begins with a blank space which I suspect is messing up my
data. Can I run an update query to get rid of this space which is always at
the left side of my data as is _12345 where the "_" is a space.

Thanks,

JR
 
O

Ofer

Back up your data first, there will be no return incase of a mistake, try this

UPDATE TableName SET TableName.FieldName= Mid([FieldName],2)

Assuming that all the records has a space in the beginning

If not, try this
UPDATE TableName SET TableName.FieldName= Mid([FieldName],2)
WHERE Mid([FieldName],2)=" "
 
J

John Spencer

Use an update query and the Trim Function

UPDATE YourTable
SET YourField = Trim(YourField)
WHERE YourField Is Not Null

Post back if you need help in setting this up using the query grid.
 
Top