Viewing 15 posts - 2,326 through 2,340 (of 4,080 total)
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
September 15, 2009 at 6:53 pm
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
September 15, 2009 at 5:32 pm
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
September 15, 2009 at 5:09 pm
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
September 15, 2009 at 2:21 pm
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
September 15, 2009 at 1:58 pm
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
September 15, 2009 at 1:40 pm
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
September 15, 2009 at 1:33 pm
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
September 15, 2009 at 11:11 am
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
September 15, 2009 at 10:28 am
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
September 15, 2009 at 9:46 am
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
September 15, 2009 at 9:11 am
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
September 15, 2009 at 8:57 am
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
September 15, 2009 at 8:55 am
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
September 15, 2009 at 8:51 am
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
September 14, 2009 at 5:11 pm
Viewing 15 posts - 2,326 through 2,340 (of 4,080 total)