quilkin
asked on
Apply results from a stored procedure to multiple rows
Hi,
I have a table that I have generated using code similar as below and I would like to perform a stored procedure on all the rows in the table. What is the best way to approach this?
I have a table that I have generated using code similar as below and I would like to perform a stored procedure on all the rows in the table. What is the best way to approach this?
SELECT col1, col2, col3
INTO Details
FROM dbo.CalibrationPoints;
ALTER TABLE Details ADD col4 REAL NULL;
SELECT @count = count(*) FROM Details;
WHILE @count > 0
BEGIN
-- EXEC spGetError @error OUTPUT, @calibrationID, referenceValue;
-- UPDATE Details SET col4 = @error where col1 = @count;
SELECT @count = @count -1;
END;
DROP TABLE Details;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You could use a cursor.
/peter
Open in new window