April 15, 2013 at 9:58 pm
Comments posted to this topic are about the item The Cascading (CROSS) APPLY
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 16, 2013 at 6:32 am
Awesome job, Chris. Well done!
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2013 at 7:17 am
Interesting, entertaining and educational with worked examples and performance statistics make this a great read.
The fact that it is also genuinely very useful and will help me to accurately solve a problem I have right now makes it invaluable.
Great job Chris. Thanks for sharing.
.
April 16, 2013 at 9:17 am
Ever since discovering a use for APPLY for the first time approximately 2 years ago, I've found I use it almost everywhere these days.
To the extent where I start looking for candidates for re-writing using APPLY! --> thankfully I'm about to move onto pastures new so the 7 years worth of stored procedures and queries I have here will no longer be candidates for such an exercise!
APPLY truly is a remarkable technique and this article adds another strong argument to the reasons why you should have this in your arsenal - if you don't yet feel confident working with APPLY work through the examples here and you'll see how powerful it is.
thanks for another great article and keep up the good work
April 16, 2013 at 9:27 am
Jeff Moden (4/16/2013)
Awesome job, Chris. Well done!
Thanks Jeff! And thank you for the encouragement to put pen to paper. DC's been nagging me for ages. Once you stepped in there was no getting out of it π
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
April 16, 2013 at 9:29 am
Tim Walker. (4/16/2013)
Interesting, entertaining and educational with worked examples and performance statistics make this a great read.The fact that it is also genuinely very useful and will help me to accurately solve a problem I have right now makes it invaluable.
Great job Chris. Thanks for sharing.
Thank you very much, Tim. Almost every day, something comes up on ssc which requires a cCA or some other manipulation of APPLY. I don't know what we did without it.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
April 16, 2013 at 11:14 am
balde (4/16/2013)
Ever since discovering a use for APPLY for the first time approximately 2 years ago, I've found I use it almost everywhere these days.To the extent where I start looking for candidates for re-writing using APPLY! --> thankfully I'm about to move onto pastures new so the 7 years worth of stored procedures and queries I have here will no longer be candidates for such an exercise!
APPLY truly is a remarkable technique and this article adds another strong argument to the reasons why you should have this in your arsenal - if you don't yet feel confident working with APPLY work through the examples here and you'll see how powerful it is.
thanks for another great article and keep up the good work
Thank you balde, and best wishes with your new venture.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 16, 2013 at 11:23 am
In the initial CREATE TABLE example, [RowNum] should be [EmployeeId].
Thanks for the great article.
Gary
April 16, 2013 at 12:53 pm
Gary Nease (4/16/2013)
In the initial CREATE TABLE example, [RowNum] should be [EmployeeId].Thanks for the great article.
Thank you very much Gary - duly updated.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 16, 2013 at 3:36 pm
ChrisM@Work (4/16/2013)
Tim Walker. (4/16/2013)
Interesting, entertaining and educational with worked examples and performance statistics make this a great read.The fact that it is also genuinely very useful and will help me to accurately solve a problem I have right now makes it invaluable.
Great job Chris. Thanks for sharing.
Thank you very much, Tim. Almost every day, something comes up on ssc which requires a cCA or some other manipulation of APPLY. I don't know what we did without it.
For single row things, we use to use "Correlated Sub-Queries" in the SELECT list. Of course, those didn't have the flexibility of returning multiple rows like Cross Apply does.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2013 at 3:44 pm
ChrisM@Work (4/16/2013)
Jeff Moden (4/16/2013)
Awesome job, Chris. Well done!Thanks Jeff! And thank you for the encouragement to put pen to paper. DC's been nagging me for ages. Once you stepped in there was no getting out of it π
Heh... I just knew what you were capable of but, ultimately, my opinion doesn't matter. The proof of what you're capable of is now officially documented. More than 7K reads in the first 2 days and 5 stars on the very first try. I say again, well done, ol' friend!
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2013 at 7:04 pm
Jeff Moden (4/16/2013)
ChrisM@Work (4/16/2013)
Jeff Moden (4/16/2013)
Awesome job, Chris. Well done!Thanks Jeff! And thank you for the encouragement to put pen to paper. DC's been nagging me for ages. Once you stepped in there was no getting out of it π
Heh... I just knew what you were capable of but, ultimately, my opinion doesn't matter. The proof of what you're capable of is now officially documented. More than 7K reads in the first 2 days and 5 stars on the very first try. I say again, well done, ol' friend!
I concur on Jeff's congratulations and on a fine article. Yours is a talent that should be shared so I'm looking forward to egging you on to even more... π
My thought question: Have you ever been told that your query runs too fast?
My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
Since random numbers are too important to be left to chance, let's generate some![/url]
Learn to understand recursive CTEs by example.[/url]
[url url=http://www.sqlservercentral.com/articles/St
April 17, 2013 at 3:20 pm
You're not doing so bad, yourself, Dwain. Ten mostly 5 star articles in a year is freakin' awesome!
--Jeff Moden
Change is inevitable... Change for the better is not.
April 17, 2013 at 7:54 pm
Jeff Moden (4/17/2013)
You're not doing so bad, yourself, Dwain. Ten mostly 5 star articles in a year is freakin' awesome!
Thanks Jeff.
Actually my latest only got 4 stars but on the other hand it passed 10K views over the weekend and is now my #1 most read article! So I'm a bit happy about that.
Now if I could just get my current effort out of its stall.
My thought question: Have you ever been told that your query runs too fast?
My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
Since random numbers are too important to be left to chance, let's generate some![/url]
Learn to understand recursive CTEs by example.[/url]
[url url=http://www.sqlservercentral.com/articles/St
April 18, 2013 at 12:46 am
Great post!! thanks for sharing..it is really very useful
--Divya
Viewing 15 posts - 1 through 15 (of 38 total)
You must be logged in to reply to this topic. Login to reply