• Brandie Tarvin (2/12/2016)


    TheSQLGuru (2/11/2016)


    Whenever I am building out dynamic SQL I always use SET QUOTED_IDENFITIER OFF first and then use double quotes in the outer sections of text. Then I never have to worry about how many stupid single quotes I need to string together to get the various requirements needed!! 😎

    Oh, stop being logical.

    We're DBAs. Logic isn't supposed to be a part of our jobs. @=)

    EDIT: And thank you for the suggestion. I'll look into it.

    While I am EXCEPTIONALLY logical and rational (just ask my wife and daughter!!), this recommendation has more to do with one of my other significant traits: I am also exceptionally LAZY!! 😀

    And you are welcome! This little tip WILL save you a LOT of irritation when dealing with dynamic SQL, I promise!

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service