Guest_imported
New member
- Jan 1, 1970
- 0
How can I prime multiple VARIABLES w/ one operation?
declare @sumC1 int, @sumC2 int, @sumC3 int
select sum(C1), sum(C2), sum(C3)
from CUST where cust_id = 123 group by cust_id
THE above SELECT returns clean values; (my real query is much more complex returning a few dozen values)
I'd like to prime VARIABLEs @sumC1 thru @sumC50 w/ in a single operation if possible.. any suggestions are appreciated!!
thx,
BT
declare @sumC1 int, @sumC2 int, @sumC3 int
select sum(C1), sum(C2), sum(C3)
from CUST where cust_id = 123 group by cust_id
THE above SELECT returns clean values; (my real query is much more complex returning a few dozen values)
I'd like to prime VARIABLEs @sumC1 thru @sumC50 w/ in a single operation if possible.. any suggestions are appreciated!!
thx,
BT