I have a process where I have to load some files into a table. In the process, I have to check and see if a duplicate record exists and if it does I have to send it to
an exception table, and then load the rest into the destination table. So I built the query using a Cursor, but I understand that it will be very slow since I am loading very large files.
I am thinking of using a While loop since it is faster but have never wrote one. If that is the best way, can someone help convert the cursor into a While Loop?
Also, is there a better way in TSQL?
Below is my script:
@AccountNumber VARCHAR(10) ,
@ProcessorAccount VARCHAR(20) ,
@DateAdded DATETIME ,
View Complete Post