Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Bulk insert Error Handling

Author  Topic 

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2005-09-13 : 01:11:21
I Have bulk insert something like

insert into table1
select * from table2

Here If I want to capture the error that would fail.how can I do that...

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-13 : 01:30:54
Using @@Error?

Refer these
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2005-09-13 : 01:34:30
But will I able to capture the exact row error
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-19 : 02:13:53
I think one of ways is to use Front End Application to insert records from one table to other row by row. When inserting catching the error if any

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -