• k.srikalyan (2/6/2013)


    Try to create a primary key/unique key on your table variable, and it is always better to go as a stored proc using temp tables and while loop instead of cursors and try building a clustered index on the temp table which will definitely improve your performance.

    While loops are not all that better than cursors, it is still RBAR.