Raiserror options

  • Comments posted to this topic are about the item Raiserror options

  • Nice question, thanks Steve.

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”

  • Well, it's obvious which anser was intended to be correct, and it would be correct if the word "implicityly" were added in the appropriate place.   

    But as it stands, the "correct" answer claims that anything that can be converted to char or varchar will do.  Now all of sql_variant, xml, CLR UDT, and hierarchyid can be converted to varchar, but that can't be done by implicit conversion so a variable , so variables of these four types can't be used as the first parameter - they would need to be converted explicitly before being handed to raiserror.

    I would be surprised if anyone got the wrong answer because of this error, so I reckon it's a good question anyway.

    Tom

  • TomThomson - Tuesday, June 20, 2017 4:02 AM

    ...
    I would be surprised if anyone got the wrong answer because of this error, so I reckon it's a good question anyway.

    You're right, Tom.
    I got it wrong the old fashioned way ... carelessness.
    🙂

  • Thanks - good question on fundamentals. I learned something.

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

Viewing 5 posts - 1 through 4 (of 4 total)

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