Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

ways to catch bad records and ON ERROR destination

$
0
0

I'm trying to load 97m rows by converting a data type of a column which is supposed to be a numeric (BIGINT) field but currently stored as varchar(11). During the load process, due to 1 or 2 bad data rows, the whole process fails. I've been trying to extract the bad records(s) using ON ERROR destination, but something's not working.

Source table:

ID bigint,

PurchaseAmount varchar(11)

Destination table:

ID bigint,

PurchaseAmount bigint

ONERROR table

ID bigint,

PurchaseAmount varchar(11)

Select query

Select ID, Cast(PurchaseAmount as bigint) as PurchaseAmount from SourceTable              

 Is there any other way I can fix the issue. I've tried using ON Error on both source and destination. But doesn't seem to work.

Any help will be appreciated!!!

                                                                                                                                            




Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>