Forum Replies Created

Viewing 15 posts - 1,456 through 1,470 (of 3,348 total)

  • RE: ISNULL

    Toreador (9/30/2014)


    hjp (9/23/2014)


    In short: This type of coding ought to be avoided at all cost! - if you assign value to a scalar variable, make sure you have a uniquely...

  • RE: Random values

    edwardwill (9/29/2014)


    Hugo Kornelis (9/26/2014)


    ... my personal coding standard is to always use aliases for all tables in queries that use two or more tables, but use no alias in single-query...

  • RE: Random values

    TomThomson (9/26/2014)


    The mixed mode in the QotD seems odd to me, though: you define the alias s so surely you should use s.ID instead of just ID unqualified just to...

  • RE: How many rows will be returned?

    Gary Varga (9/24/2014)


    This is a great example of a QOTD describing a "gotcha". If anyone knows any others which they discovered or just know about then I, for one, would...

  • RE: How many rows will be returned?

    Carlo Romagnano (9/23/2014)


    Triggers on tables execute only if at least ONE row is affected. So, explanation is wrong.

    Select code from question

    Copy

    Paste

    Execute

    Insert foot into mouth and chew.

    Sorry, Carlo, but you are...

  • RE: Supported spatial data formats

    What, all those links but none for further reading on CHTM? I am disappointed!

    Just kidding, of course.

    Thanks for the laugh!

  • RE: ISNULL

    Good question, mediocre explanation.

    This has nothinng to do with the ISNULL being executed or not. The correct explanation would be that the SELECT assigns a value once for each row...

  • RE: Truncate table query

    Koen Verbeeck (9/11/2014)


    Please don't say truncate table data isn't logged unless you understand the concepts involved.

    😉

    The Myth that DROP and TRUNCATE TABLE are Non-Logged

    Allow me to rephrase that.

    Please don't say...

  • RE: While loop Testing

    I fail to see the point of this question.

    I personally think the maximum nesting depth of 160-odd is completely irrelevant. Rewrite your code, long before you ever hit this.

    But if...

  • RE: What will this query return?

    TomThomson (9/4/2014)


    I have written quite a few parsers, and handling what I've described is not at all hard

    That comment was not directed at you or your proposal. 🙂

    One more reason...

  • RE: What will this query return?

    DrKiller (9/4/2014)


    I think the explanation need some work.

    CTEs doesn't ALWAYS need a semi-colon in front.

    This for example works fine:

    DECLARE @tmpVariable INT

    WITH cte

    AS

    (

    SELECT 1/0 as 'Result'

    )

    SELECT *

    FROM...

  • RE: SQL Server 2008 r2?

    Depending on interpretation of the question, there are three or four correct answers, not two. And the explanation of the correct answers is also wrong. Really a missed opportunity,

    "#table dose...

  • RE: Functions as predicates and SARGable queries

    I am torn between two opinions on this question.

    It is a good question because of the educational value on how the optimizer works and how indexes are (can be) used.

    But...

  • RE: Choose only two correct answers?

    SQLRNNR (8/22/2014)


    Raghavendra Mudugal (8/21/2014)


    TomThomson (8/21/2014)


    twin.devil (8/21/2014)


    Just for the information.

    Becuase #table names max length is only 116 characters in SQL Server 2008 r2. its also valid of SQL SERVER 2012.

    It's...

  • RE: Phantoms and isolation

    Raghavendra Mudugal (8/18/2014)


    But I still don't understand how my asking is wrong?

    You asked how to achieve the same speed without nolock. That question suggests that if it would not be...

Viewing 15 posts - 1,456 through 1,470 (of 3,348 total)