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 «««45678»»

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

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, June 23, 2015 12:12 PM
Points: 14, Visits: 22
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: Wednesday, November 5, 2014 1:36 PM
Points: 235, Visits: 730
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: Friday, August 7, 2015 9:49 AM
Points: 349, Visits: 188
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: Yesterday @ 9:43 PM
Points: 38,313, Visits: 35,222
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."

(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: Yesterday @ 9:43 PM
Points: 38,313, Visits: 35,222
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."

(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 @ 1:26 AM
Points: 7,398, Visits: 8,097
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: Yesterday @ 9:43 PM
Points: 38,313, Visits: 35,222
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."

(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
Posted Tuesday, June 23, 2015 8:48 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 1:18 PM
Points: 162, Visits: 684
[b]Jeff Moden
Beer has some interesting freezing qualities... take it down to somewhere between 26 and 28oF and it's still liquid. Give it a little bit of a sharp rap and all the beer in the bottle will turn to ice in just several seconds.

The "Hot Ice" trick requires a chemical that you can make from regular household items like vinegar and (IIRC) baking soda and (IIRC) Isopropyl alcohol which, of course, is poison to drink. Makes a really cool (no pun intended) effect though. Hmmm... I wonder if it'll still work with Ethanol.


It does not have to be beer. Supercooled water can be produced - you need distilled water. You probably will not be able to do this in a freezer, the mechanical vibrations from the compressor would be equivalent to the shaking action you want to create yourself to be able to observe the spontaneous formation of ice. You have to use a cold bath of salty water brought down to below the freezing temperature of pure water. What happens is that shaking creates nucleation sites where the phase can change to solid ice.

I just completed viewing all of prof. Grossman's Thermodynamics DVD lectures - this was just one of his many demos.
Post #1696939
Posted Tuesday, June 23, 2015 9:00 AM


SSC-Dedicated

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

Group: General Forum Members
Last Login: Yesterday @ 9:43 PM
Points: 38,313, Visits: 35,222
I've actually had the phenomena occur in my truck overnight in the winter months both with bottled spring water and Pepsi. It's amazing how cold it was (~10o-15oF) and it was still liquid.

--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."

(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 #1696951
« Prev Topic | Next Topic »

Add to briefcase «««45678»»

Permissions Expand / Collapse