var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Combine select and exec with union all
I basically want to combine a select and an exec of a stored procedure with a union all.
Is this possible?
Each result of course has the same fields.
A sample of my code is below:
hours = sum(hours),
rate = round(cast(rate AS decimal(7, 2)), 2),
dollars = round(cast(SUM(dollars) AS decimal(8, 2)), 2),
not_ot = sum(not_ot),
ot_hours = sum(ot_hours)
and leave_type <> '80' --exclude pre-paid vaca
group by badge, dept, leave_type, code2, rate
having SUM(hours) > 0
Not directly. You would have to insert the results of the stored procedure in a temp table, then union the temp table with the other select.
thats what I was thinking. Thanks for the input