[dba-SQLServer] Append only new records

Robert L. Stewart robert at webedb.com
Tue Mar 4 12:24:27 CST 2008


John,

With the correct logic, read stored procedure, you can do
what you want to do. You could also use SSIS to build a
project to do it. Do not turn off the IGNORE DUPLICATES.
Use a stored procedure or SSIS package to do the work for
you.

Robert

At 12:00 PM 3/4/2008, you wrote:
>Date: Mon, 3 Mar 2008 17:17:29 -0500
>From: "jwcolby" <jwcolby at colbyconsulting.com>
>Subject: [dba-SQLServer] Append only new records
>To: "'Discussion concerning MS SQL Server'"
>         <dba-sqlserver at databaseadvisors.com>
>Message-ID: <007901c87d7c$5f255d00$0201a8c0 at M90>
>Content-Type: text/plain;       charset="us-ascii"
>
>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





More information about the dba-SQLServer mailing list