Forum Replies Created

Viewing 15 posts - 76 through 90 (of 105 total)

  • RE: Executing Dynamic SQL

    Carlo Romagnano (9/26/2013)


    Be aware of case:

    DECLARE @STR VARCHAR(8000) = N'SELECT * FROM sys.objects'

    EXECUTE SP_EXECUTESQL @STR

    It should be:

    DECLARE @STR VARCHAR(8000) = N'SELECT * FROM sys.objects'

    EXECUTE...

  • RE: Disable [guest] database user in [msdb] database

    Dscheypie (9/23/2013)


    Interesting question. Yet I have another one:

    Why not disabling "guest" for the master database?

    I guess because SQL Server needs the access to the master database for extracting information from...

  • RE: Variable Declaration

    Thanks for the question.

    Interesting the logical execution of

    declare @word varchar(100) = 'apple'

    in two phases.

  • RE: Reserved Words - 1

    Thanks for the question but the explanation is a bit confusing. As per BOL

    http://technet.microsoft.com/en-us/library/ms174393.aspx

    When SET QUOTED_IDENTIFIER is OFF, literal strings in expressions can be delimited by single or...

  • RE: wildcards

    L' Eomot Inversé (9/16/2013)


    Drew Copenhaver (9/16/2013)


    Steve Jones - SSC Editor (9/16/2013)


    Drew Copenhaver (9/16/2013)


    Yeah, my initial thought was "2, if my instance of 2008R2 properly handles regex, we'll see..." So I...

  • RE: Declare Variable

    Koen Verbeeck (9/15/2013)


    The question itself is great, however the explanation is lacking.

    There's no reference, and the explanation itself is incorrect.

    There's no variable that is "reset".

    The DECLARE is not ignored, it...

  • RE: wildcards

    Ross.M (9/11/2013)


    raulggonzalez (9/11/2013)


    As somebody said, most of those complaining, run the script before answering the question which is "cheating", so they shouldn't be rewarded for cheating.

    If you are giving points...

  • RE: wildcards

    Steve Jones - SSC Editor (9/11/2013)


    raulggonzalez (9/11/2013)


    Steve Jones - SSC Editor (9/11/2013)


    My apologies for the error. the question was tested, but as I'm sure many of you have done, I...

  • RE: wildcards

    Steve Jones - SSC Editor (9/11/2013)


    My apologies for the error. the question was tested, but as I'm sure many of you have done, I made a change in production, altering...

  • RE: wildcards

    Carlo Romagnano (9/11/2013)


    The correct exceution of the query depends on ansi_warnings

    set ansi_warnings off

    DECLARE @i TABLE( mychar VARCHAR(10));

    INSERT @i VALUES ('Steve'), ('Stephan'), ('Stephanie')

    ...

  • RE: Garbage Collection

    SQLRNNR (9/5/2013)


    Thomas Abraham (9/5/2013)


    raulggonzalez (9/5/2013)


    Thanks for the question, but it would have been useful if it was specified that is a SQL Server 2012 environment as in previous versions this...

  • RE: Garbage Collection

    Thanks for the question, but it would have been useful if it was specified that is a SQL Server 2012 environment as in previous versions this didn't exist.

  • RE: NTILE

    Thanks for the question, it made me scratch my head 🙂

    The answers are worded as in BOL, anyway just trying to match the definition with the RANKING functions was a...

  • RE: Object binding

    Good question,

    Just a quick BOL reference to clarify things

    A procedure can reference tables that do not yet exist. At creation time, only syntax checking is performed. The procedure is...

  • RE: Indexing in views

    Nice question, and not being sure that the index was removed by the ALTER VIEW statement, having the index with the same name as the clustered index was really helpful...

Viewing 15 posts - 76 through 90 (of 105 total)