In your 'select' statement make every other column either a comma or a space:-
Select col1
,','
,col2
,','
,col3
From Table
;
If you need a delimited file with alined columns then cast each column as a character field. This will ensure that the column is always 'n'...
I'm not sure if this is what you are refering to but you can create an incrementing column in Teradata SQL if you are running V2R3 or higher.
This is possible using the CSUM function:-
Select '1' as sequence
,CSUM(sequence,??column??)
From Target_table
group by 1
;
??column?? can be...
If you are running your SQL under the BTEQ application on the client (be it MVS,Unix or whatever) you should be able to repeat the SQL script using the '.REPEAT n' command where 'n' is the number of times you wish to repeat (place this before the SQL statement). Alternatively you can end your...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.