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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transfer Text Method

Status
Not open for further replies.

WAR40K

Technical User
Oct 29, 2003
29
0
0
US
I've run into a problem where I have two requirements for a *.csv file created from an access table. First, I need it to be comma delimited, without quotes around text fields, and secondly it needs to be a fixed width. With the TransferText method it seems I can do one or the other using the export specification, but not both.

In addition, when I export the text file the specification drops leading zeros and truncates decimals to two decimal places.

For example, I have a field with a value of 001 and another field with a value of 29.0000. I need to keep the numbers as formated but the resultant text file will display them as 1 and 29.00 respectively. Is there any way to preserve the formatting and have a fixed width, comma dilimited file without text identifiers?

Thanks
 

Have you tried to export a formated query?

SELECT FORMAT("1", "0000"), .....
FROM myTable;

Should read

0001,......
 
Thanks, I'll give that a try. Last night I discovered that part of my problem was with field type. I converted all my numbers to text so the export wouldn't try and "correct" my output values.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top