Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Paul White
»
Understanding and Using APPLY (Part 2)
51 posts, Page 1 of 6
1
2
3
4
5
»
»»
Understanding and Using APPLY (Part 2)
Rate Topic
Display Mode
Topic Options
Author
Message
Paul White
Paul White
Posted Saturday, April 17, 2010 11:16 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 1:24 AM
Points: 10,989,
Visits: 10,539
Comments posted to this topic are about the item
Understanding and Using APPLY (Part 2)
Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #905448
Paul White
Paul White
Posted Sunday, April 18, 2010 3:36 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 1:24 AM
Points: 10,989,
Visits: 10,539
I would like to express my sincere thanks to the following people, for their help in producing this article:
Amanda Lawrence
Jeff Moden MVP
Chris Morris
Lutz Müller
Jason Brimhall
Paul
Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #905547
peter-757102
peter-757102
Posted Monday, April 19, 2010 4:27 AM
SSC Veteran
Group: General Forum Members
Last Login: 2 days ago @ 3:57 AM
Points: 288,
Visits: 1,903
Excellent and with enough extra material to make it interesting for those already familiar with apply!
Post #905819
clementhuge
clementhuge
Posted Monday, April 19, 2010 4:43 AM
SSC Journeyman
Group: General Forum Members
Last Login: Sunday, May 19, 2013 3:27 PM
Points: 89,
Visits: 285
Very interesting. I alrady use cross apply (mostly with table-valued functions) and I use a lot of xqueries. I like the last t-sql code about xquery. I was not using aliases and also navigating with rowset and the apply functions. Good tip!
Clement
Post #905822
Mike M - DBA2B
Mike M - DBA2B
Posted Monday, April 19, 2010 6:19 AM
SSC Veteran
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 1:12 AM
Points: 207,
Visits: 531
Thank you once again, Paul. I'll be experimenting today.
I just noticed something that I think is in error:
The first CROSS JOIN example under your "Equivalent Expressions Using APPLY and JOIN" header performs "ORDER BY S.name ASC, S.name ASC". Is that supposed to be "S.name ASC, J.name ASC"?
Regards,
Mike M
Post #905890
greenclay
greenclay
Posted Monday, April 19, 2010 6:19 AM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, May 09, 2013 8:48 AM
Points: 1,
Visits: 95
Thanks for this article. There's a lot to consider here.
In the CROSS JOIN section, the query
SELECT S.name, J.name
FROM dbo.Student S
CROSS
JOIN dbo.Subject J
ORDER BY S.name ASC, S.name ASC;
should read
SELECT S.name, J.name
FROM dbo.Student S
CROSS
JOIN dbo.Subject J
ORDER BY S.name ASC, J.name ASC;
should it not?
Post #905891
Daniel Bowlin
Daniel Bowlin
Posted Monday, April 19, 2010 7:21 AM
SSCrazy
Group: General Forum Members
Last Login: 2 days ago @ 1:10 PM
Points: 2,673,
Visits: 2,418
A thorough and well explained article. The supplemental file was a real bonus. Thanks.
Post #905955
WayneS
WayneS
Posted Monday, April 19, 2010 8:31 AM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 9:12 AM
Points: 6,370,
Visits: 8,235
Paul - another excellent article on using APPLY. Thank you so much for doing this... now I need to find the time to disect these two articles, and get a good understanding of them.
Again, thanks for doing these.
Wayne
Microsoft Certified Master: SQL Server 2008
If you can't explain to another person how the code that you're copying from the internet works, then
DON'T USE IT
on a production system! After all,
you
will be the one supporting it!
Links:
For better assistance in answering your questions
,
How to ask a question
,
Performance Problems
,
Common date/time routines
,
CROSS-TABS and PIVOT tables Part 1
&
Part 2
,
Using APPLY Part 1
&
Part 2
,
Splitting Delimited Strings
Post #906030
Trey Staker
Trey Staker
Posted Monday, April 19, 2010 9:00 AM
Ten Centuries
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 4:52 PM
Points: 1,379,
Visits: 2,626
Very well written article. Thanks Paul.
---------------------------------------------------------------------
Use Full Links:
KB Article from Microsoft on how to ask a question on a Forum
Post #906061
Tom Garth
Tom Garth
Posted Monday, April 19, 2010 9:37 AM
SSC Eights!
Group: General Forum Members
Last Login: Friday, February 04, 2011 7:20 AM
Points: 977,
Visits: 1,499
I will be using APPLY beginning this week. Thanks for a really understandable series.
Tom Garth
Vertical Solutions
"There are three kinds of men. The one that learns by reading. The few who learn by observation. The rest of them have to pee on the electric fence for themselves." -- Will Rogers
Post #906095
« Prev Topic
|
Next Topic »
51 posts, Page 1 of 6
1
2
3
4
5
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.