Hello there,
this is my problem. I have a table in sql server. lets say it table_read.
I use a cursor like this.
But my problem is that the last row of table_read is inserted twice in table_write!
Any solutions? Should I fix the cursor or try to remove duplicate records from table_write?
Thank you!
this is my problem. I have a table in sql server. lets say it table_read.
I use a cursor like this.
Code:
DECLARE CUR CURSOR FOR SELECT * FROM TABLE_READ OPEN CUR WHILE @@FETCH_STATUS=0 BEGIN FETCH NEXT FROM CUR INTO @local_var1 @local_var2 ... INSERT INTO TABLE_WRITE VALUES (@local_var1, @local_var2...) END CLOSE CUR DEALLOCATE CUR GO
Any solutions? Should I fix the cursor or try to remove duplicate records from table_write?
Thank you!
Comment