I tried concatenating and having a seperate line for the columns as you have suggested. But the problem is, the file is writing additional NULL rows to the file and the format of the heading is too off! Can you please help?
This is how the Header looks like -
((((((((((((((((((((Trim(BOTH FROM ORD_NBR)||',')||Trim(BOTH
Error Rows -
A,B,C,D,E,F,G (good row - Concatenated values)
It's difficult to give a complete answer with so little information.
Clearly you are not using the (TITLE '') as suggested above to eliminate the default column title.
Perhaps some values being concatenated are NULL (in which case the result is NULL); you may need to COALESCE.
You could also investigate the CSV function which has been added since the original set of posts.
But the best advice is unchanged: BTEQ may not be the appropriate tool, consider using TPT instead.