title: Export results from DB2 to CSV including column names via bash
body: <p>This question branches off a question already asked.</p>
  
  <p>I want to make a csv file with the db2 results including column names.</p>
  
  <pre><code>EXPORT TO ...
  SELECT 1 as id, 'COL1', 'COL2', 'COL3' FROM sysibm.sysdummy1
  UNION ALL
  (SELECT 2 as id, COL1, COL2, COL3 FROM myTable)
  ORDER BY id
  </code></pre>
  
  <p>While this does work, I am left with an unwanted column and rows of 1 and 2's</p>
  
  <p>Is there a way to do this via the db2 command or a full bash alternative without redundant columns while keeping the header at the top?</p>
  
  <p>e.g.</p>
  
  <p><code>Column 1    Column 2    Column 3
   data 1      data 2      data3
   ...         ...         ...</code></p>
  
  <p>instead of:</p>
  
  <p><code>1    Column 1    Column 2    Column 3
   2    data 1      data 2      data3
   2    ...         ...         ...</code></p>