Forum Replies Created

Viewing 15 posts - 2,896 through 2,910 (of 3,348 total)

  • RE: An interesting thing about isnull

    Paul White NZ (4/1/2010)


    Hugo Kornelis (3/31/2010)


    ...I submitted a bug report... a case I constructed, based on this discussion, where COALESCE(..., 1) may erroneously return NULL (which should of course never...

  • RE: An interesting thing about isnull

    Paul White NZ (4/1/2010)


    On the subject of IAM-driven scans. You are, of course, absolutely right about the conditions for an IAM scan on a table with a clustered index...

  • RE: Primary Keys

    C.K.Shaiju (4/1/2010)


    Hi Hugo,

    The 3rd and 6th options seems similar.

    Shaiju C.K.

    You are right! Thanks for pointing it out. The sixth option should have read "A clustered index exists ..." instead of...

  • RE: Full backup Scenario

    Tom.Thomson (3/31/2010)


    And I see the MS design does include flushing already dirty pages to disc despite Hugo's suggestion that this is not a useful thing to do.

    Yes, I noticed that...

  • RE: Concatenation Cursor

    The query uses [font="Comic Sans MS"]IsNull(@MaleNames + ', ','') + [name][/font].

    When @MaleNames is NULL, [font="Comic Sans MS"]@MaleNames + ', '[/font] is NULL as well, so the ISNULL kicks in and...

  • RE: An interesting thing about isnull

    Hugo Kornelis (3/31/2010)


    my gut feeling is that, if the same data is used multiple times in a query, it should use the same value, regardless of concurrent modifications.

    (And, of course,...

  • RE: An interesting thing about isnull

    Paul White NZ (3/31/2010)


    Hugo Kornelis (3/31/2010)


    I've got to correct you AND myself now.

    Did you read the comments in Alex's blog entry (including mine) or the previous article?

    My point there, as...

  • RE: An interesting thing about isnull

    sknox (3/31/2010)


    If each statement were indeed treated as its own transaction, then Hugo's query should always return the same results in all three values, because it's a single statement (even...

  • RE: An interesting thing about isnull

    Paul White NZ (3/31/2010)


    Hugo Kornelis (3/31/2010)


    No. That would be possible if you use NOLOCK or READ_UNCOMMITTED, but not at the default level (READ_COMMITTED).

    I know you know this! It has...

  • RE: An interesting thing about isnull

    Paul White NZ (3/31/2010)


    Hugo Kornelis (3/31/2010)


    I would agree that, depending on transaction isolation level and @@TRANCOUNT, the results of the three statements might be different on a busy server. But...

  • RE: Declarative Data Integrity

    Peter Trast (3/31/2010)


    Tom.Thomson (3/31/2010)


    Peter Trast (3/30/2010)


    Paul White NZ (3/30/2010)


    Thank you for making my head hurt!

    You don't like T-SQL much, do you? 🙂 Seems to have a bad effect on the...

  • RE: An interesting thing about isnull

    Paul White NZ (3/31/2010)


    Hugo Kornelis (3/31/2010)


    I disagree. If the query includes some non-deterministic code (such as NEWID()), there might be room for argument. But if the query in itself is...

  • RE: An interesting thing about isnull

    Paul White NZ (3/31/2010)


    Hugo Kornelis (3/31/2010)


    So if any of the arguments is a subquery, the implementation if COALESCE((subquery), ...) becomes CASE WHEN (subquery) IS NOT NULL THEN (subquery) ... ELSE...

  • RE: An interesting thing about isnull

    James Lean (3/31/2010)


    CirquedeSQLeil (3/30/2010)


    However, you will find that many prefer the isnull due to an increase in performance.

    Do you have a supporting link or further information on the performance difference...

  • RE: Query cost

    Paul White NZ (3/30/2010)


    Hugo Kornelis (3/30/2010)


    I was not able to find any way to get the SELECT * to behave other than the SELECT 1

    Me either! I tried indexes,...

Viewing 15 posts - 2,896 through 2,910 (of 3,348 total)