Forum Replies Created

Viewing 15 posts - 2,626 through 2,640 (of 3,348 total)

  • RE: HAVING EXISTS

    Bradley Deem (9/8/2010)


    In regards to your practice application example, assuming I understand the requirement, I believe there is a mistake in the having clause. See the comment in the first...

  • RE: HAVING EXISTS

    A while back, I promised to post the QotD code in a copy/paste ready format in the discussion when I have the code as a graphic in the question. Yet,...

  • RE: HAVING EXISTS

    Thanks, all, for the kind words!

    jcrawf02 (9/8/2010)


    Hugo, do you have an application of this?

    Yes, I have. Although that particular situation called for a HAVING NOT EXISTS.

    I can't share the actual...

  • RE: Inside the Optimizer: Constructing a Plan - Part 1

    I agree with the previous comments - great article!

    jim.jaggers1 (9/7/2010)


    Can you help me understand the difference in the Nested Loops operator between the first and second plan? Other than...

  • RE: SSIS Scripting

    Good question! I had to do a fair bit of research, but it did pay off in the form of a point. Thanks, Andy!

  • RE: Group by

    Open Minded (9/6/2010)


    I got the answer right, after a long series of wrongs.

    Hugo Kornelis (9/6/2010)


    Good question!

    1. FROM clause. Build an intermediate set as a copy of the single table in...

  • RE: Group by

    tommyh (9/6/2010)


    Hugo Kornelis (9/6/2010)


    Good question!

    In addition to your explanation, here is WHY an alias can be used in the ORDER BY, but not in the GORUP BY:

    Because Microsoft havent implemented...

  • RE: Group by

    Good question!

    In addition to your explanation, here is WHY an alias can be used in the ORDER BY, but not in the GORUP BY:

    The correct result of any SQL query...

  • RE: Solving the "Running Total" & "Ordinal Rank" Problems (Rewritten)

    WayneS (9/5/2010)


    Hugo Kornelis (9/3/2010)


    Please go back to page 4 of this topic. One of my posts on that page includes a very fast algorithm that completely avoids undocumented features. And...

  • RE: Solving the "Running Total" & "Ordinal Rank" Problems (Rewritten)

    Jeff Moden (9/4/2010)


    Hugo, it takes one awesome professional to post something like that above. Even if we vehemently disagree (and you'll be surprised that we disagree less than you...

  • RE: Solving the "Running Total" & "Ordinal Rank" Problems (Rewritten)

    Paul White NZ (9/4/2010)


    Hugo Kornelis (9/4/2010)


    My examples on page 11 in this topic still produce incorrect results.

    If we add the safety check, things work out nicely:

    (...)

    Correct results and an optimal...

  • RE: The Semantics of NULL in SQL Server 2008

    frodriguez.im (9/4/2010)


    Now how do you differ an empty or blank field from one with no value? I understand them to be the same.

    In a varchar column, the empty value is...

  • RE: Solving the "Running Total" & "Ordinal Rank" Problems (Rewritten)

    SwePeso (9/3/2010)


    A correct implementation of "Ordered CTE Update" would look something like this (no clustered index).

    (...)

    SELECTTOP(2147483647)

    (...)

    ...

  • RE: Solving the "Running Total" & "Ordinal Rank" Problems (Rewritten)

    Paul White NZ (9/3/2010)


    Jeff Moden (9/3/2010)


    If a SEEK occurs, you could get an out of order update and that's why I didn't recommend INDEX(1). INDEX(0) forces the clustered index...

  • RE: Solving the "Running Total" & "Ordinal Rank" Problems (Rewritten)

    Less than two days, and I already have a lot of catching up to do. This topic sure if lively! 😉

    Jeff Moden (9/3/2010)


    I usually value your opinion but you have...

Viewing 15 posts - 2,626 through 2,640 (of 3,348 total)