Macro to replace spaces in a field

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

For some reason I have developed spaces preceding all records in a linked
table.

I use this linked table to create a CSV file and then import that CSV file
into another DB. I don't really care about the spaces in the original
linked file ( I don't know how to rid my self of the using the import
specification)

Since I am a complete novice I was hoping I could just execute a macro to
delete all the spaces in all records in this field directly after importing
the file. I see the find command but I am not sure how to limit it to one
field. I would like to find and replace all "spaces" in the field.

Thanks
 
Run an update query similar to this:

UPDATE TableName
SET FieldName = Trim(FieldName);

You can run this query via an OpenQuery action in a macro.
 
I tried that, it replaces all my records with "FieldName"

My sql looks like this:
UPDATE Daily_sales SET Daily_sales.uom = Trim("uom");
 
Back
Top