Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fixed length Text Export Question

Status
Not open for further replies.

starbird2273

IS-IT--Management
Jul 27, 2005
26
US
Hi, I have a specific format that I need to take data I have in a table and export to. The catch is I only have 3 of the 14 fields, and the rest are not required. Is there a way to do this? I saw some information in thread181-536954.

Thanks.
 

A query selecting the fields you need is the answer. Export that instead of the table.
 
thank you, but will that include the missing fields? I just want basically this as the output

fld1 -don't have
fld2- have, need to start at position 11
fld3 - don't have
through
fld13 - don't have
fld14 - have, need to start at position 150
 

Select Space(10)& [fld2] & Space(139 - Len([fld2])& [fld14]
FROM TableName
 
Thank you. This is working well. However, I have leading zeros that are not staying with the records (for example, $40 should be 0000004000, but is coming up 40.00) any ideas for that?
 

Select Space(10)& Format(Int([fld2])*100, "0000000000") & Space(139 - Len([fld2])& [fld14]
FROM TableName
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top