In SQL Server, I have to use two cursor to iterate from two tables. But I have a problem with this because the result from the select with the two cursor is with duplicate rows. So my question is how to iterate from two or more cursors in SQL Server as you must know that the two cursors are depend on each other.
Thanks in advance.
Try to make a distinct on the select and you don’t have duplicate rows.
But why in hell do you need two cursors? I strongly advise you to change that code!