
November 10th, 2003, 03:59 AM
|
 |
superficial
|
|
Join Date: Mar 2002
Location: Peterborough, England
Posts: 188
Time spent in forums: 2 h 36 m 8 sec
Reputation Power: 12
|
|
|
Stored proc
I have written a stored procedure with a cursor, to loop a distinct set of names and grab associated data on them
How can I insert summed columns in a stored procedure, for example,
if i declare @total as an integer and then do select @total = sum(field)
if i then try an insert into statement, with @total - it does not allow me to execute.
whats the best way to get around this and can anybody explain the reasons why this doesnt work, im sure there are good ones!
__________________
_______________
Matt
|