SQL Server Performance

How to remove a cursor that executes a stored proc for each row

Discussion in 'T-SQL Performance Tuning for Developers' started by jay_snow, Aug 30, 2013.

  1. jay_snow New Member

    Hi ,

    I have inherrited a system with a lot of hideously unoptimized code, i am currently trying to remove a cursor from a job that takes a LONG time to run every night. However i dont seem to be able to replicate what its doing with set based logic. I know what i want to do, get the data into a temp table and use a case statement to determine which rows should have the proc executed. However i have not been able to get this to work yet...............does anyone have any examples for code i can use as an alternative to this cursor.............any tips pointers or examples would be greatly appreciated.


Share This Page