Unions in stored procedures | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Unions in stored procedures

I have a stored procedure that when run in DTS/Execute SQL Task will not return the records in the union, but when it is run in sql analyzer all records are correctly returned? Any thoughts on why it wouldn’t work in DTS
Hi, i created DTS to execute SQL query and transfer data into access DB and it running fine.
I ran,
select employeeID from orders where orderid=10248
union select employeeID from orders where orderid=10249
Please explain in brief about your issues.
also capture the DTS op in Profiler to verify it is issuing the query you think it is supposed to issue
]]>