mrdenny
46765 pts. | Sep 4 2009 6:42PM GMT
Doing a row by row insert of rows into the SQL Server will be many times slower than doing a single recordset insert.
When doing your insert into the table you should check the destination table, and only insert rows which do not exist.
insert into table1 select top 1000 columnname from table2 WHERE NOT EXISTS (SELECT * FROM table1 WHERE table1.id = table2.id)
Jsql
140 pts. | Sep 5 2009 2:54AM GMT
Thanks very much.
Inserting row by row is a very slow process and using cursor on 50 million records is just not going to end the process.
Its good if we can capture the error and store it in log to know the cause.
I was looking for, if there is a way to ignore errors while Bulk Insert like I’ve mentioned in the query. Looks like the solution is to insert row by row only to ignore errors..
Thanks all again.






