G
Guest
Hello,
I have a SELECT statement
(SELECT DISTINCT Products FROM Shelf
UNION
SELECT ' @#@#@#@#' AS Col1 FROM Shelf) that returns:
Products
--------
@#@#@#@#
Alcoholic Beverages
Milk
I have another SELECT statement
(SELECT DISTINCT Food FROM Shelf
UNION
SELECT ' @#@#@#@#' AS Col1 FROM Shelf) that returns:
Food
-------
@#@#@#@#
Pasta
Pizza
And I want to retrieve a result of the union of the 2
SELECT statements in the original ordering of the
members, i.e.:
Products
----------
@#@#@#@#
Alcoholic Beverages
Milk
@#@#@#@#
Pasta
Pizza
How can I do it? When I tried to use UNION, the result
was reordered and I the result I got was:
Products
----------
@#@#@#@#
@#@#@#@#
Alcoholic Beverages
Milk
Pasta
Pizza
I have a SELECT statement
(SELECT DISTINCT Products FROM Shelf
UNION
SELECT ' @#@#@#@#' AS Col1 FROM Shelf) that returns:
Products
--------
@#@#@#@#
Alcoholic Beverages
Milk
I have another SELECT statement
(SELECT DISTINCT Food FROM Shelf
UNION
SELECT ' @#@#@#@#' AS Col1 FROM Shelf) that returns:
Food
-------
@#@#@#@#
Pasta
Pizza
And I want to retrieve a result of the union of the 2
SELECT statements in the original ordering of the
members, i.e.:
Products
----------
@#@#@#@#
Alcoholic Beverages
Milk
@#@#@#@#
Pasta
Pizza
How can I do it? When I tried to use UNION, the result
was reordered and I the result I got was:
Products
----------
@#@#@#@#
@#@#@#@#
Alcoholic Beverages
Milk
Pasta
Pizza