Many times developer ask me that How can they remove Cursor?
They need to increase Query Performance, that's why they need to remove SQL SERVER
Cursor and find the alternate way to accomplish the same.
Please find this code to remove cursor with Table variable:
--declare table......