Hello,
I have a SP that has the following algorithm.
IF <SomeCondition>
BEGIN
SELECT * FROM TABLE1
END
ELSE
BEGIN
SELECT * FROM TABLE2
END
--Union the above with the query below
UNION
SELECT * FROM TABLE3
The recordset returned is EXACTLY the same. I need to do a UNION of that resultset and another query.
Is there a way to do this without having to use a temp table?