Hi I am trying to write a store procedure that contains 2 select statements and I want the union of that to be the output. My select statements work very well at the command line. But when I use it in a store procedure, I get errors such as the above or errors where the entire SQL statement is ignored after the SELECT statement. Can somebody point if there is a different way to code select statements in a SP.
Thanks