DW Marker wrote:
All -
I am trying to figure out how to get a comma delimited file from the
command line which includes the column headings as the first line. I
know how to create a del file using export, but it doesn't put the
headings. I also know I could redirect the output from a select, but a
select isn't comma delimited... Any ideas?
Lots of options:
(1) write to the file and phrase the query in the export in such a way that
the first row produces the required headings
(2) use EXPORT and subsequently modify the file to prepend the header
(3) use a simple SELECT statement, redirect the output to a file, and along
the way ensure that the first row contains the header. You can do that by
redirecting two SELECT statements to the same file.
(4) Use a separate file for the header. That avoids the whole issue from
the beginning.
--
Knut Stolze
DB2 Information Integration Development
IBM Germany