• Why must you return only 1 row at a time? Couldn't you return the data as a set and let the business layer or UI handle the looping? IMO that would be more effecient, as you would have one call to the DB and the rest done in memory. If you post some DDL, test data, and expected/desired results as mentioned in the link in my signature then you will likely get some solutions proposed.