Link to home
Start Free TrialLog in
Avatar of morang
morang

asked on

Add trailing spaces to a field

How to I add trailing sapces to a field that will be exported to a .csv file
Avatar of GRayL
GRayL
Flag of Canada image

You can only add trailing spaces using a query:

Update myTable set myFld = myFld & "   ";

three spaces for example
Avatar of morang
morang

ASKER

will that work if the number of spaces is not the same for every record?
ASKER CERTIFIED SOLUTION
Avatar of GRayL
GRayL
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of morang

ASKER

Thank you for your help
rather than writing to the table, you can also create a query that adds the spaces dynamically.

- Create a new query
- Add all the fields that you'd like exported
- replace the field(s) where you need trailing spaces with
     myFld:table.myFld & space(number of spaces)
- export new query

That way you're never writing to your original data
morang:  What bmoabc makes a lot of sense. Rather than the update to your table turn the update into a normal select query and export the the query.

bmoabc:  morang had accepted a minute before your post arrived.