Asger Blond
ab-mi at post3.tele.dk
Mon Mar 3 16:51:14 CST 2008
I think the option WITH IGNORE_DUP_KEY = ON for the unique index will do what you want. HTH Asger -----Oprindelig meddelelse----- Fra: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] På vegne af jwcolby Sendt: 3. marts 2008 23:17 Til: 'Discussion concerning MS SQL Server' Emne: [dba-SQLServer] Append only new records I am building a table of known validated addresses in the US. For my purposes all I have is Address, city, state, zip and HashAddr. HashAddr is a has which is guaranteed to be unique given the input which is the address fields given. In Access you could append records in at random and those records which did not collide with a unique index goes in, and those that do collide do not go in. Obviously an index on the HashAddress will be the unique index. Is it possible to do the same kind of thing in SQL Server? When I have tried this before (in SQL Server), the whole process aborted if a collision occurred, with no records appended if there was any collision. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com