• dwain.c (7/17/2013)

    Brandie Tarvin (7/17/2013)


    Not only did I just teach myself how to use MERGE (never had time or reason), but I managed to use it correctly with a Cross Applied Tally table and an INNER JOIN inside the USING clause.


    And it only took me 30 minutes to figure it all out.

    One thing to take care with when using MERGE though: A Hazard of Using the SQL Merge Statement[/url]

    It's not a bug it's a feature, but does have the potential to cause you grief if you don't know about it.

    Okay. Read the article. Reread it again. I understand the conclusion, but the content was a little iffy. There are certain assumptions made about the reader understanding what the writer was doing without setting up a plain English business case. So I'm still confused on why the author decided to deliberate throw in a DELETE on the NOT MATCHED BY SOURCE bit and then act surprised when it worked as advertised.

    Thanks for the link, though.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.