ChrisM@Work (1/24/2014)
phineas629 (1/24/2014)
... I am required to use the cursor...Perfectly reasonable so long as this is homework.
It shouldn't be homework as I recognize this from a previous thread http://www.sqlservercentral.com/Forums/Topic1532233-338-1.aspx
You should try to get rid of the cursor. Even if this will be used only for a small set of rows, you might need to work with larger sets in the future and cursors will become a performance issue.