Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««34567

Hidden RBAR: Counting with Recursive CTE's Expand / Collapse
Author
Message
Posted Wednesday, August 10, 2011 6:31 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 10:03 PM
Points: 35,956, Visits: 30,244
Jon Russell (8/10/2011)
As usual, excellent! Thanks, Jeff.


You bet, Jon. Thanks for stopping by and for the feedback.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

"Change is inevitable. Change for the better is not." -- 04 August 2013
(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1158150
Posted Wednesday, August 10, 2011 6:34 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Sunday, April 13, 2014 11:40 PM
Points: 12, Visits: 19
No, I use custom stored function for that purpose.

-Leonard
Post #1158151
Posted Thursday, August 11, 2011 1:58 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 8:07 AM
Points: 235, Visits: 714
Excellent article. A great example of why I come to SQLServerCentral.com . . . to learn from the best.
Post #1158787
Posted Thursday, August 11, 2011 10:37 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, April 14, 2014 11:39 AM
Points: 313, Visits: 127
Jeff Moden (8/10/2011)
Paul Herbert (8/10/2011)
As usual a good article Moden.

A minor correction if you don't mind. If you are going to quote my 'Really?!", I think it needs both a question mark & an exclamation point. That way it reads like I say it ... a touch of amusement & a ton of WTF. :)


Everyone... please meet and greet Mr. Paul Herbert... the Systems DBA where I work at. We've slain many dragons together in the short year or so that we've had the opportunity to work with each other. I've been trying to convince him to write an article about some of the things he's done on the Administrative side of the world. Maybe you good folks can help me convince him.


Welcome Paul!

I'd really be interested in an administrative article by you. The administrative side is my primary SQL job focus, but I know there are so many things that I could set-up better on that side.

Plus you could always let slip something embarrassing or funny or both about Jeff in the article!
Post #1158962
Posted Friday, August 12, 2011 6:18 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 10:03 PM
Points: 35,956, Visits: 30,244
Bill Kline-270970 (8/11/2011)
Excellent article. A great example of why I come to SQLServerCentral.com . . . to learn from the best.


Thanks, Bill. I really appreciate the compliment but, gosh no... I'm not in "the best" category. There are plenty of folks that are much better at this than I. I just try really hard to keep up with all of them.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

"Change is inevitable. Change for the better is not." -- 04 August 2013
(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1159129
Posted Friday, August 12, 2011 6:20 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 10:03 PM
Points: 35,956, Visits: 30,244
Kenney Hill (8/11/2011)
Plus you could always let slip something embarrassing or funny or both about Jeff in the article!


Heh... the fact that I talk with the dust bunnies isn't bad enough?


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

"Change is inevitable. Change for the better is not." -- 04 August 2013
(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1159131
Posted Friday, August 19, 2011 5:01 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:49 AM
Points: 6,798, Visits: 6,272
Another great article Jeff


Jeff Moden (8/8/2011)
... some would say that I, indeed, have no taste buds


Surely you meant 'no taste'



Far away is close at hand in the images of elsewhere.

Anon.

Post #1162367
Posted Friday, August 19, 2011 2:07 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 10:03 PM
Points: 35,956, Visits: 30,244
David Burrows (8/19/2011)
Another great article Jeff


Jeff Moden (8/8/2011)
... some would say that I, indeed, have no taste buds


Surely you meant 'no taste'


heh... that, too! And don't call me "Shirley".


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

"Change is inevitable. Change for the better is not." -- 04 August 2013
(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1162754
Posted Tuesday, May 15, 2012 9:13 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, June 23, 2013 10:39 PM
Points: 231, Visits: 506
Nice article...

Using tally( or numbers table) is best way..Easy to code :).


GulliMeel

Finding top n Worst Performing queries
Improve the performance of Merge Join(special case)
How to Post Performance Problem -Gail Shaw
Post #1300344
« Prev Topic | Next Topic »

Add to briefcase «««34567

Permissions Expand / Collapse