Viewing 15 posts - 44,161 through 44,175 (of 59,097 total)
Grant Fritchey (4/16/2009)
Jeff Moden (4/16/2009)
Thread softly and carry a big pork chop.You owe my company a new monitor.
Ha!
BWAA-HAA!!! "Let them eat thread!"
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2009 at 11:40 am
Thread softly and carry a big pork chop.
Don't thread on me.
Give me thread or give set based.
To thread or not to thread... that is the question.
"42" has been replaced by...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2009 at 11:20 am
UMG Developer (4/16/2009)
Jeff Moden (4/16/2009)
Here's the code...
[font="Courier New"]DECLARE @PrevActualCost MONEY,
@RunningTotal MONEY,
@PrevID INT
SELECT @PrevActualCost = 0,
@RunningTotal = 0
UPDATE t
SET @RunningTotal = RunningTotal = @RunningTotal + ActualCost,
@PrevID = ID
FROM #tmp t...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2009 at 10:58 am
WayneS (4/16/2009)
Maybe someday, I can teach Jeff something.
You just did. Thanks, Wayne.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2009 at 10:15 am
mtrafzer (4/16/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2009 at 10:12 am
Oh yeah... almost forgot... the "black art" running total method requires that you have the proper clustered index to work. It will not work correctly if you reference a...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2009 at 1:32 am
Mr. Young... very nice job. Immensely entertaining article and follow up posts to boot. My hat is off to you, Sir... I know just what you're going through...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2009 at 1:16 am
Michelle Gutzait (4/15/2009)
What are your thoughts about Adam Machanic's article:
http://sqlblog.com/blogs/adam_machanic/archive/2006/07/12/running-sums-redux.aspx ?
I tried to compare Adam's code to other options and came up with this...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2009 at 12:52 am
Thomas (4/15/2009)
Look at features you need to know to write the while loop vs. the cross Join. In the case of the while loop, you need to know about the...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2009 at 12:00 am
As always with such a hot topic, the great battle between the "intuitiveness" of cursors comes forward. The classic example on this thread seems to have been based on...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 15, 2009 at 10:51 pm
James Tran (4/14/2009)
- Store the result data in table var with rownumber
- create a row index var...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 15, 2009 at 9:44 pm
SanjayAttray (4/14/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
April 15, 2009 at 9:36 pm
Manie Verster (4/14/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
April 15, 2009 at 9:24 pm
ZA_Crafty (4/15/2009)
gautamsheth2000 (4/13/2009)
Should use this code 🙂Select count(*) From master.sys.columns C1 CROSS JOIN master.sys.columns C2
You can do even one better.
using the PK in count is faster than *
ie,
Select count(id)...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 15, 2009 at 9:11 pm
Thomas (4/15/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
April 15, 2009 at 8:25 pm
Viewing 15 posts - 44,161 through 44,175 (of 59,097 total)