This is what I am trying to do
EXEC sp1 1 SELECT * FROM x UNION if(@num <= 1) EXEC sp1(2) else null //want to return null to stop
I could d