How to specify order in UNION
A reader, January 20, 2017 - 2:45 pm UTC
Thanks Chris. This works, however, I only need the results in column D. Reason being is that I will use this query in MS Query in Excel where the results will be exported into designated cells. I do not need the extra sequent column Q. Anyway to make that invisible?
January 20, 2017 - 4:35 pm UTC
Just don't select it, see the example in the review below.
hum
gh, January 20, 2017 - 4:05 pm UTC
select d from
(
select 1 q, 'query 1' d from dual
union
select 2 q, 'query 2' d from dual
union
select 3 q, 'query 3' d from dual
union
select 4 q, 'query 4' d from dual
order by q;
)
January 20, 2017 - 4:35 pm UTC
Thanks.