Lets say I have something like this:
SELECT 'SELECT * FROM Table1'
UNION
SELECT 'SELECT * FROM Table2'
UNION
SELECT 'SELECT * FROM Table3'
UNION
SELECT 'SELECT * FROM Table4'
UNION
SELECT 'SELECT * FROM Table5'
I would like to EXEC each of the select statement in each row. Usually, I use a LOOP with an EXECUTE statement. Is there a way around this without using a loop?