With the DB tool sqsh, I want to get the column names and the data tab delimited.
The bcp option does not include the column names.
The csv option includes the column names, but uses comma as the separate (doh). Is there a way to change it?
Currently looking to post-process the file to change the commas to tabs (ignoring the commas within strings...).
Please note that since sqsh version 2.5 it is now possible to assign control characters to some variables like colsep, linesep, bcp_colsep and bcp_rowsep. So the
should work now properly with sqsh-2.5.
You can
\set colsep="\t"
to change the separator for the standard output to tab.Edit: \t didn’t work (in my cygwin), so I used <CTRL-V><TAB>. That works: