sql - Union All Transform: How to order the inputs -
i using union transform combine 2 input data sets. first data set 1 column header , second 1 column of data. want use union transform combine header , data rows 1 output column. can't figure out how make header row appear first, before data. no matter do, header comes last. appreciated!
so have query
select <columns> header_table union select <columns> data_table;
introduce artifical column sort , use in order by
select * ( select 0 sort, <columns> header_table union select 1 sort, <columns> data_table) raw order sort;
Comments
Post a Comment