Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

SQL Query to move only those records which are not present in the CRM organization

Posted on by 255

Hi all,
i have a scenario where i have to migrate data from SQL server database to CRM Online. While executing the SSIS package, it is throwing an error- some Duplicate records already present in the CRM Online.
Now, I want to move only those data that are not present in the Online CRM.
Need help..!! 

*This post is locked for comments

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: SQL Query to move only those records which are not present in the CRM organization

    One way to do this is to export the current records from CRM Online to a SQL table (e.g. CurrentCrmRecords). You can then either:

    • Modify your existing query to omit records that are in this CurrentCrmRecords table (you can use a NOT IN or NOT EXISTS operator)
    • Or, use an SSIS lookup transformation that has the CurrentCrmRecords table as the source, and only migrate data from the No Match output

    In either case you need to be careful if there are nulls in the fields that are used to identify duplicates. If nulls cannot trigger duplicates, then the easiest way to handle this is to exclude records with null values from the export from CRM

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans