MERGE

  • Another +1 for a good question. I got it right by sheer luck. I ignored the trailing semicolon bit earlier, mostly because I always forget them anyway... *blush*.

    Seriously though, that's not the reason I'd though it was going to choke. Excellent to know. I've yet to be set loose in a place I can roll out 2k8 code in production so Merge and I aren't very familiar with each other. It's good to learn these little annoyances.

    On a side note, this is why I'm roughly convinced I will include as little code as possible in any QotD I provide. I know there's been many questions that have hung people up with 'trickster' code, so I don't blame folks, but I think it takes away from the real purpose of the question.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • +1 Good Question thought I had it but I was wrong, been using the MERGE statement alot these days but never with Tables having INSTEAD OF triggers

    You learn something new each day 🙂

  • just ware of the fact that MERGE statement should end up with ;

    never used Instead OF trigger, its good if anyone you can explain it with an example

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • kapil190588 (10/11/2012)


    just ware of the fact that MERGE statement should end up with ;

    never used Instead OF trigger, its good if anyone you can explain it with an example

    Explanation and examples can be found here: http://msdn.microsoft.com/en-us/library/ms175521%28SQL.105%29.aspx

    If you still have questions after that, feel free to post those questions here.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • Good question, thanx.

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

Viewing 5 posts - 31 through 34 (of 34 total)

You must be logged in to reply to this topic. Login to reply