Thanks Matt.
Sorry - I neglected to mention I was looking for a solution with SSIS.
My technique is to send the data to a staging dest table, then call a sproc
that does this exact left join technique on the dest server once the data is
local.
What would be a common solution? Somehow a lookup first, if found ignore, of
not then send to dest table. I prefer this, then I don't have to manage
staging tables.
Thanks,
chris
[quoted text, click to view] "Matt" wrote:
> The easiest way to do this would probably be with transform data task with a
> source query like the following:
> SELECT SourceTable.*
> FROM SourceTable
> LEFT JOIN DestinationTable
> ON SourceTable.PrimaryKey = DestinationTable.PrimaryKey
> WHERE Destinationtable.PrimaryKey IS NULL
>
> This query will return all records from your SourceTable that do not have
> corresponding records in your destination table. Hope this helps!
> "Chris" wrote:
>
> >
> > What is the best way to load records into a destination only if the pk value
> > does not exist?
> >
> > tia