Forum Replies Created

Viewing 15 posts - 2,326 through 2,340 (of 4,080 total)

  • RE: Request help with a query

    Jeff, make sure you go back and look at the code I posted again, as it has been revised. (Seth pointed out that I wasn't resetting the @timer.)...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Are the posted questions getting worse?

    Although I don't hail from NZ, I must be counted among the All Blacks' supporters.

    I also root for the Essendon Bombers if I ever get a...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Request help with a query

    You're welcome, new Jeff. But by all means, make note of the subquery solution as well. As I finally conceded, when your volumes...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Request help with a query

    I've posted here for a number of years now, and have taken my share of lumps too. I doubt the process is over. But here is also...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Request help with a query

    where there may be many factors beyond one's control

    This is exactly why you DON'T want screen display time in the mix. It includes system processes that have nothing...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Request help with a query

    I can't argue with "It depends."

    Lynn, I need a judgment call from an official:

    Is the above a more polite way of saying...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Request help with a query

    Ahhhh :w00t:

    You're absolutely right. The first SET @timer was OUTSIDE the while loop. My bad, and thanks for pointing that out, Seth. ...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Request help with a query

    Okay.... I knocked this out before taking off for lunch. Now anybody reading can satisfy themselves using Jonathan's measurement of time to execute, since he doesn't seem to think...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Request help with a query

    I wouldn't have offered the cte/row_number() solution at all if this was the T-SQL 2000 forum... because it wouldn't even compile. This is T-SQL(SS2K5). What...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Request help with a query

    And I'll take a helicopter over your hunter.

    Next you get a sparrow missile to shoot down my helicopter.... 😉

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Request help with a query

    3) It is no slower than the CTE.

    Don't trust the workload estimations from the visual display of execution plans.

    Look at the I/O stats for a clue as to...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Request help with a query

    2) It works with versions of SQL Server older than SQL Server 2005.

    True, and I used to code that way before better techniques were made available in 2005/2008. ...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Request help with a query

    1) It preserves information when there are ties. Showing only one row in the result set removes what could be relevant information. In fact the CTE query given will return...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Request help with a query

    I do not know why such a long query has been posted.

    ;with cte as (select *,ROW_NUMBER() over(partition by vehicle order by dueHours) as seqID from @sample )

    select *...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Subquery in Case When that can produce multiple results for IN query

    Um.... aren't those both the same link?

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 15 posts - 2,326 through 2,340 (of 4,080 total)