Exporting to ascii file

S

Sandy Burgess

I have a table that I need to export in an ascii format. The problem is all
of the fields in the ascii file are created as left justified. I need the
fileds with a data type of number to be right justified. Any ideas how to
correct this?

I'm using an export spec. Fixed width code page is US-Ascii. Data types
of integer and Long interger need to be right justified.
 
K

Klatuu

Sorry, Sandy, I don't think there is a way to do that. When you are
exporting to text, it converts the numbers to text.
 
D

Douglas J. Steele

You can convert the numbers to right-justified strings along the lines of:

Right(Space(10) & [NumericField], 10)

and then export that text.
 
J

John Nurick

Hi Sandy,

Use calculated fields in the query, something like this. Replace F
with the name of the field and W with the width in characters.

Right(Space(W) & Format([F], "0"), W)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top