[dba-SQLServer] SQL Server - Append records without fail

Asger Blond ab-mi at post3.tele.dk
Mon May 2 16:18:36 CDT 2011


John,
If the unique index is created with the option IGNORE_DUP_KEY then the behaviour will be the same as in Access.
Asger

-----Oprindelig meddelelse-----
Fra: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] På vegne af jwcolby
Sendt: 2. maj 2011 22:27
Til: Access Developers discussion and problem solving; Sqlserver-Dba
Emne: [dba-SQLServer] SQL Server - Append records without fail

In access you can append records into a table and if a given record fails, the rest go in.  I use 
that as a quick and dirty filter sometimes when (for example) appending records from one place to 
another.

AFAICT SQL Server will not append any of the records if any single record fails to append, which has 
always seemed strange to me.  It's almost like an unrequested rollback.

Is there any way to make SQL Server accept the appends that will go in and only reject the ones that 
will not for some reason?

-- 
John W. Colby
www.ColbyConsulting.com
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com





More information about the dba-SQLServer mailing list