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

SQL Question

Status
Not open for further replies.

PeterL

IS-IT--Management
Oct 30, 2000
129
US
I wrote an SQL statement which selects records for export to a flat file. I need to begin the flat file with a comma. This flat file is comma delimited. How can I add a comma to the beginning of the SQL statement so that the file appears correct. Here is a sample of the SQL statement:

"SELECT ToCounter.LeadingComma,ToCounter.[Corporate Name],ToCounter.[Acct Address],ToCounter.[Acct City],ToCounter.[Acct State],ToCounter.[Acct Zip Code],ToCounter.UnitSerialNo,ToCounter.CoinValue,ToCounter.Commission,ToCounter.WriteDate,ToCounter.TechName FROM ToCounter
 
Have you tried this ?
SELECT Null,...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I don't understand. How does "Select Null," equate to a "," in my export statement.
 
Because I guess you'll export the query to a csv and if the first field is null then the first character will be the delimiter.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
You are correct. This worked like a charm. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top