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 Monday, April 19, 2010 9:40 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, June 24, 2014 9:17 AM
Points: 40, Visits: 75
This is an excellent follow up to the first article. In the example for displaying a comma separated values list of all the test scores for each student, could you have also used the coalesce function to prevent the first comma in the output?




Post #906097
Posted Monday, April 19, 2010 10:46 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 10:11 AM
Points: 21,346, Visits: 15,022
Paul White NZ (4/18/2010)
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


You're welcome.

It is a good article - and it was a pleasure to help.




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #906159
Posted Monday, April 19, 2010 11:38 AM


SSC-Dedicated

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

Group: Administrators
Last Login: Yesterday @ 5:13 PM
Points: 33,100, Visits: 15,210
Excellent job, Paul. It helped me learn a few things about a command I rarely use.






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #906217
Posted Monday, April 19, 2010 3:49 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:46 AM
Points: 7,042, Visits: 12,972
Great article series, Paul!
It was a pleasure being selected to get a preview and to give some thoughts/comments.
Let's see how long it takes until I have referenced those two articles more often then I did Jeffs CrossTab/DynamicCrossTab




Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #906387
Posted Monday, April 19, 2010 3:52 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, June 16, 2014 9:38 AM
Points: 2,163, Visits: 2,189
Paul, Wow, thanks for these two articles they really helped me understand better use of APPLY. Now if I can just remember all of that I think I will use it a lot more.

Thanks again!
Post #906389
Posted Monday, April 19, 2010 5:24 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 6:07 PM
Points: 11,194, Visits: 11,109
Mike and Green Clay:

Yes the ORDER BY in the CROSS JOIN example should be as you say - oddly it is only the image in the article that has this typo, the downloadable code is correct.

Paul




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #906410
Posted Monday, April 19, 2010 7:40 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,902, Visits: 9,480
More great stuff Paul, thanks!

-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #906449
Posted Tuesday, April 20, 2010 2:00 AM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Friday, June 20, 2014 3:51 AM
Points: 139, Visits: 4,615
Thank you Paul!

You post it just when I needed to use the CROSS APPLY to process a XML file
Post #906604
Posted Tuesday, April 20, 2010 2:42 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:42 AM
Points: 5,018, Visits: 10,523
Always great stuff from you, Paul.
Well done.


--
Gianluca Sartori

Get your two-cent-answer quickly
spaghettidba.com
@spaghettidba
Post #906630
Posted Tuesday, April 20, 2010 8:49 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 4:18 AM
Points: 8,574, Visits: 9,082
Nice article, Paul. With this and the previous one I think I'm beginning to understand apply (a feature I haven't yet used, but probably will sometime soon now that you have shown me how it can be used to express things in a nice clean modular fashion).

Tom
Post #907389
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse