Am doing Bulk insert, using while loop. but i want to collect all records which are giving error due to columns datatype mismatch with data which is inserting....for eg writing some code
in below: problem here is when am inserting string value in datetime column at 6 record, it stop executing while loop there itself. but i want to continue while loop even though error ocurs and i want insert all error givng records in some @temp table. pls help me.
declare @a int
DECLARE @temp TABLE(a varchar(2))
INSERT INTO Temp4(DateColumn) select dtCreatedDate from Temp3 where strErrorMessage=@a
-- delete from dbo.Temp4
insert into @temp(a) select @a
select * from @temp