insert into dbo.Table ([field1], [field2], [field3])
select [field1], [field2], [field3]
from dbo.NewData
some of the records in dbo.NewData conflict with CHECK constraints
so the whole transaction rolls back
what is the easiest way to get a list of the records which are conflicting?
is there an equivalent of IGNORE_DUP_KEY but for CHECK constraints?
or a version of OUTPUT that outputs the records that failed to insert?
I can think of many ways to approach this - but I am wondering if there is a quick and easy trick?
Especially when there are numerous CHECK constraints, millions of rows and only a few "stragglers"