[dba-VB] Merge / Purge

jwcolby jwcolby at colbyconsulting.com
Wed Oct 14 15:19:54 CDT 2009


Stuart,

Yes there is a PKID.  The thing is, every record is equal so it simply doesn't matter in which order 
the records are pulled.  Any of the duplicates can be treated as the first record to be updated by 
whatever is found in the subsequent records.

It literally doesn't matter which record is encountered first.

John W. Colby
www.ColbyConsulting.com


Stuart McLachlan wrote:
> John,
> 
>>>> wins" strategy. Every field in every record has to be examined. "Existing data" cannot 
> be 
>>>> overwritten by "no data" but MUST be overwritten by "most recent data". Recent is 
> defined by record 
>>>> position, NOT date (I don't have date info).
> 
> SQL Server doesn't have a concept of chronological record position. Unless there is 
> atimestamp or incrementing field, there is no way to know which is the most recent entry or 
> to guarantee that the most recent will be the "last" record in the recordset selected.
> 
> Do use have an incrementing key field?
> 
> 
> Stuart McLachlan
> 
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> 



More information about the dba-VB mailing list