Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL Server
Expertise: Beginner
Mar 24, 1997

Delimited Data

Question:
Is there a quick and dirty way to export a delimited dataset via a simple query? I would like to get something like:
    value1,value2,value3
(The delimeters could be commas, semi-colons, etc.)

Answer:
If your database doesn't directly support export in CSV (Comma Separated Value) format, you can construct the delimiters in a query with the concatenate operator:

SELECT value1||', '||value2||', '||value3
    FROM Table;
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date