简体   繁体   中英

SQl Output to CSV WITHOUT single Quotes

I am running a query on Adaptive Server Anywhere v7.

select customerinfo.customerid, Name, Address1, Address2, City, State, ZIP, Country from customerinfo, addressinfo
where customerinfo.customerid = addressinfo.customerid
and MEMBER = (Date(GetDate()-4))
and addressinfo.addresstype = 's';
Output to C:\SamplePacks.CSV

Output is:

123, 'name','address1,'address2'.....

Is there a way to run the query so that the single quotes DO NOT show?

See doc

QUOTE clause The QUOTE clause is for the TEXT output format only. The quote string is placed around string values. The default is a single quote ('). If ALL is specified in the QUOTE clause, the quote string is placed around all values, not just around strings. To suppress quoting, specify empty single quotes. For example, QUOTE ''.

So it seems that you should do

Output to 'C:\SamplePacks.CSV' QUOTE ''

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM