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 12345»»»

Understanding and Using APPLY (Part 2) Expand / Collapse
Author
Message
Posted Saturday, April 17, 2010 11:16 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: 2 days ago @ 12:48 PM
Points: 9,923, Visits: 11,169
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
Posted Sunday, April 18, 2010 3:36 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: 2 days ago @ 12:48 PM
Points: 9,923, Visits: 11,169
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
Posted Monday, April 19, 2010 4:27 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 11:27 AM
Points: 329, Visits: 2,240
Excellent and with enough extra material to make it interesting for those already familiar with apply!
Post #905819
Posted Monday, April 19, 2010 4:43 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Sunday, August 31, 2014 10:04 AM
Points: 89, Visits: 294
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
Posted Monday, April 19, 2010 6:19 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, September 17, 2014 11:03 AM
Points: 215, Visits: 573
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
Posted Monday, April 19, 2010 6:19 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, July 26, 2014 9:03 AM
Points: 1, Visits: 108
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
Posted Monday, April 19, 2010 7:21 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 7:35 AM
Points: 2,817, Visits: 2,563
A thorough and well explained article. The supplemental file was a real bonus. Thanks.
Post #905955
Posted Monday, April 19, 2010 8:31 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 8:59 PM
Points: 5,357, Visits: 8,912
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
Posted Monday, April 19, 2010 9:00 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 1, 2014 9:46 PM
Points: 1,142, Visits: 2,684
Very well written article. Thanks Paul.

---------------------------------------------------------------------
Use Full Links:
KB Article from Microsoft on how to ask a question on a Forum
Post #906061
Posted Monday, April 19, 2010 9:37 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, February 4, 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 »

Add to briefcase 12345»»»

Permissions Expand / Collapse