Help on zero field

  • Thread starter Thread starter Duyen
  • Start date Start date
D

Duyen

Hi. I'm working on converting a data file into a text file format that my
other system reads. The data file of mine contains 5 different numeric fields
but these fields are not zero filed and right justified. How can I zero
field the numeric field that is valid for 14 characters?

Example:
Current Want it to be
1200 00000000001200
21341 00000000021341
Can someone help me with this please?????
 
Duyen said:
Hi. I'm working on converting a data file into a text file format that my
other system reads. The data file of mine contains 5 different numeric fields
but these fields are not zero filed and right justified. How can I zero
field the numeric field that is valid for 14 characters?

Example:
Current Want it to be
1200 00000000001200
21341 00000000021341


And you are using what to create the text file?

If you are just exporting a table to the text file, then use
a query based on the table instead of just the table. The
query can use the Format function (or other string
functions) to firmat the numbers as needed. E,g,

SELECT Format(number,"00000000000000") As FormattedNum,
other fields, ...
FROM yourtable
 
Back
Top