Wondering if someone has a better alternative to the following code. The goal is to combine the record data for 3 columns into a single one.
SELECT QUEUE
FROM
(
SELECT QUEUE AS QUEUE
FROM MYSCHEMA.MYTABLE QUEUE1
UNION
SELECT SUPERVISOR AS QUEUE
FROM MYSCHEMA.MYTABLE QUEUE2
UNION
SELECT MANAGER AS QUEUE
FROM MYSCHEMA.MYTABLE QUEUE3
)
AS QUEUES
SELECT QUEUE
FROM
(
SELECT QUEUE AS QUEUE
FROM MYSCHEMA.MYTABLE QUEUE1
UNION
SELECT SUPERVISOR AS QUEUE
FROM MYSCHEMA.MYTABLE QUEUE2
UNION
SELECT MANAGER AS QUEUE
FROM MYSCHEMA.MYTABLE QUEUE3
)
AS QUEUES