no, you cannot use UNION with stored procedures.
but you CAN use UNION with stored functions, so if you can transform your procedures into functions, you can do this:
select * from dbo.Function1()
union all
select * from dbo.Function2()
note that you should use UNION ALL wherever possible, as UNION alone does a implicit DISTINCT on the returned rows, which first of all costs resources and is often giving confusion
Main Topics
Browse All Topics





by: gpompePosted on 2006-11-28 at 12:31:39ID: 18031146
you cannot do that