Insert with OUTPUT clause

  • Comments posted to this topic are about the item Insert with OUTPUT clause

  • Nice question. Of course I got it wrong, as I thought it would be the same answer as the QotD from 13th of May. 🙂

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Good Question .....By Seriously I attempted the question luckly my answer is match with answer....

  • thanks... i had to read BOL to get this right... 🙂

  • Nice question... with a twist from the QOD from the other day 😀

    _______________________________________________________________________
    For better assistance in answering your questions, click here[/url]

  • A twist on previous question agreed, but I do not agree with the choice of answers. It is a bit too vague to select that as an answer.

  • Agree with rjv:

    A twist on previous question agreed, but I do not agree with the choice of answers. It is a bit too vague to select that as an answer.

    Tricky with the select at the end. Good question, makes one think. I do a lot with triggers and output statements and had doubts.

    Steve Jimmo
    Sr DBA
    “If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan

  • Good question, it made me think some. I did refer back to the previous similar question to see what was different, which helped.

  • Nice question. I almost got it wrong because when I read it, I assumed the output had a "into @myTable" after it. But when I read it again (and actually paid attention this time), I saw it didn't. 😀

  • Thanks For the Good Question 🙂

  • Thanks - nice question.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Another good question, but a bit close to the one posted 6 days earlier - I was catching up on QOTD today after a while of not having time so I got to these two questions maybe 15 minutes apart (would have been less if I hadn't spent time thinking about the first one). If I hadn't seen the previous one, and read the references in the explanation and played a bit with output clauses to get a better feel I would probably have guessed this one wrong (picked the syntax error instead of another error).

    Tom

  • I received the following error message when I ran the script on SQL Server 2005.

    Msg 170, Level 15, State 1, Line 2

    Line 2: Incorrect syntax near 'OUTPUT'.

    Can someone put a light on this?

Viewing 13 posts - 1 through 12 (of 12 total)

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