• Tava (11/7/2012)


    SQL-Squid (11/7/2012)


    Tava (11/6/2012)


    SQL-Squid,

    I was told I can request the app designer to include a primary key in the feed I receive, if that does happen, the merge will be a lot better, but if not I need to have something in place to work.

    To me it's beneficial to fix the main problem and thats the source file... If it's required for you to do what you need just have to ask and explain its importance otherwise there will be these issues ....

    adding a PK on their extract will be simple for them unless for some reason its not allowed.

    obviously if the source file can't be fixed - then MERGE might not be suited for you (my opinion) & this method you currently have is only way to go.

    Uniqueness is required for the merge Updat/Delete ro work;

    you better off with separate update ..

    Or, if the duplicate row count is pretty less ; then you can filter those rows out of the merge statement and then update later only for these...or clean it before the update in the target; on the basis of design and requirement.

    ~ demonfox
    ___________________________________________________________________
    Wondering what I would do next , when I am done with this one :ermm: