Viewing 15 posts - 1,171 through 1,185 (of 4,080 total)
Recipe number 7 looks a lot like recipe #1 to me... This problem seems oddly familiar though.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
May 17, 2011 at 5:08 pm
You didn't mention how big your table was (number of rows.)
To see some performance comparisons of different techniques dealing with a similar problem.
http://www.sqlservercentral.com/articles/T-SQL/69481/
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
May 16, 2011 at 3:12 pm
You CAN use a CASE statement in a COUNT... --Jeff Moden
It's just a personal preference. I just feel happier summing ones and zeroes, than...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
May 12, 2011 at 12:34 pm
One approach is to use SUM(CASE...) in place of COUNT().
The trick is to make the test for an earlier Trans_Type = 1 quick. Depending on the...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
May 11, 2011 at 4:26 pm
Forget the object_ID. You need to know the object name for a table_source in the SELECT ... FROM.
I can think of two approaches...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
May 11, 2011 at 10:17 am
Brandie: Congratulations for the story AND congratulations for getting to do work that you love.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
May 6, 2011 at 3:40 pm
I don't believe this should be done with set-based coding. You are essentially slicing up an ordered set of row into 3k chunks ( or "tiles" as...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
May 1, 2011 at 11:30 pm
SQLRNNR (4/28/2011)
Stefan Krzywicki (4/28/2011)
The Dixie Flatline (4/28/2011)
SQLRNNR (4/28/2011)
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 28, 2011 at 4:14 pm
SQLRNNR (4/28/2011)
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 28, 2011 at 3:05 pm
Jason, it's easy.
Use DBCC TimeWarp's
New parameters.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 28, 2011 at 2:36 pm
Haiku
Listen... can you tell?
Someone is using cursors.
Hear the pork chops fly!
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 28, 2011 at 2:28 pm
I think that was the point behind his question, Stefan. Why would he ever need to make a computed column persisted?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 28, 2011 at 2:23 pm
In this as in all things, it depends.
You are correct. If your query is using a covering index then the data isn't coming from the clustered index....
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 28, 2011 at 1:04 pm
Did you deliberately comment out @RunningTotal in your FETCH...INTO?
FETCH NEXT FROM RunningTotalCursor
INTO @conta,@docnome, @u_subconta, @data, @mlstamp,@dinome, @adoc, @dilno, @edeb, @ecre, @NomeCli--, @RunningTotal
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 28, 2011 at 12:34 pm
There is nothing wrong with using a function in a stored proc nowadays. However, there have always been issues with substituting subqueries with scalar functions that included...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 28, 2011 at 10:59 am
Viewing 15 posts - 1,171 through 1,185 (of 4,080 total)