Álvaro
Álvaro

Reputation: 3

DASHDB(DB2)/BLUEMIX(IBM CLOUD): Export CSV with custom separator (not comma)

Is there any way to export a CSV from DASHDB/DB2 in BLUEMIX (IBM CLOUD) with another separator than comma?

My data if full of commas and this separator is useless for me.

Thanks! :)

Upvotes: 0

Views: 190

Answers (2)

Julen Hernandez
Julen Hernandez

Reputation: 38

I have the same problem, I have solved using IBM Data Studio, it´s a IDE based on eclipse, with it you can connect to your ibm db2 on cloud, search in "tables", find your table, right button on your table, and select "Download -> with SQL", change file type to "*.csv" then you can choose the delimiter and field separator.

enter image description here

Upvotes: 0

Paul Vernon
Paul Vernon

Reputation: 3901

Many definitions of CSV use the convention that double quotes are used to surround text fields. The Db2 cloud console does that. Also if a field has an embedded double quote, the console will repeat it within the string to indicate that it is not the end of the string. Many tools (including Excel) follow this convention.

So you should be able to export from the RUN SQL page on the console without trouble. If you are exporting using db2 EXTERNAL TABLE or EXPORT commands, again those will follow the same convention

Upvotes: 0

Related Questions