I need to combine the results from multiple executions of a stored procedure. I am trying to use the Union statement as follows, but I'm getting this error message: Incorrect syntax near the keyword 'UNION". What am I doing wrong?
@StartDate DateTime = 20100101,
@EndDate DateTime = 20100115
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
--Get Direct Labor Hours
EXEC dbo.uspLaborHoursByCategory 'PARFLS',@StartDate, @EndDate, 100000, 799999, '100', '899','Direct Labor',6,0
EXEC dbo.uspLaborHoursByCategory 'CANFLS',@StartDate, @EndDate, 100000, 799999, '100', '899','Direct Labor',6,0