export a field with varying space

muppetmad

Registered User.
Local time
Today, 05:03
Joined
Sep 29, 2003
Messages
42
I have a query that I export to a text file with fixed width settings.

For one particular field that had only been one character and 5 spaces I used PGM: " " & [ProgramCode] for my field. The recipient of the export file requires that this field be 6 spaces long and leading spaces fill in any unused field.

Now, one of the records for this field will be 2 character so the way it is now will cut off the leading character. How can I write this to add leading spaces until it reaches 6?
 
Have you tried this?

PGM: Format([ProgramCode],'@@@@@@')
 

Users who are viewing this thread

Back
Top Bottom