Unanswered: DB2 export with column headers - problem
I am trying to export data in db2 using export utility.
But the result of this export gives nothing. I just get the column headers but there is no data(for the second select)
I think the Select statement cannot handle strings more than 255 characters.
Is there any workaround for this? typecasting, or something else?
EXPORT TO ABCDUMP.csv OF del
modified by nochardel
Thanks for your answer, that was indeed the problem.
I used CASE statement for each field and made it empty when the field in null.
But there is another problem I am facing with this sql.:
1st select contains the header and 2nd select contains the data.
I want the header to be in the first row, and then the data from the second row onwards.
But the UNION and ORDER BY makes the header somewhere in between and not in the order I want.
I tried putting a space in the column header, and then used a ORDER BY.
But the system which is trying to upload this file is not accepting a space as a first character. I dont want the system to be changed.
Could you please help. I just want the header to be in the first row.