Generate csv file with headers...using db2 export ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Disco1
    New Member
    • Aug 2012
    • 1

    #1

    Generate csv file with headers...using db2 export ?

    Hi,
    I want to add headers to a csv file I am generating from db2 export utility ...
    I am using the following sql
    db2 -x "EXPORT TO /home/runTest.csv of DEL MODIFIED BY coldel,
    select col1,col2,col3
    from <some table>
    union all values '"Header1","Hea der2","Header3" ';"

    I am getting error "SQL0421N The operands of a set operator or a VALUES clause do not have the
    same number of columns. SQLSTATE=42826"

    Kindly help
Working...