Log in
::
Register
::
Not logged in
Search:
Home
Articles
Editorials
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Advertise
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 Jeff Moden
»
Cross Tabs and Pivots, Part 2 - Dynamic Cross...
98 posts, Page 1 of 10
1
2
3
4
5
»
»»
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Rate Topic
Display Mode
Topic Options
Author
Message
Jeff Moden
Jeff Moden
Posted Tuesday, December 02, 2008 10:15 PM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 11:38 PM
Points: 18,291,
Visits: 12,310
Comments posted to this topic are about the item
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
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."
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #612568
ChiragNS
ChiragNS
Posted Wednesday, December 03, 2008 2:34 AM
SSCrazy
Group: General Forum Members
Last Login: 2 days ago @ 3:48 AM
Points: 2,032,
Visits: 1,598
Another masterpiece.
Small typo -
You have a single quote missing at the end of the date for the code under OLD fashioned swap.
"SET @EndDate = '2008-01-15 "
"Keep Trying"
Post #612631
Jeff Moden
Jeff Moden
Posted Wednesday, December 03, 2008 5:03 AM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 11:38 PM
Points: 18,291,
Visits: 12,310
Chirag (12/3/2008)
Another masterpiece.
Small typo -
You have a single quote missing at the end of the date for the code under OLD fashioned swap.
"SET @EndDate = '2008-01-15 "
Thanks Chirag. I don't know how the heck I do that... I'm real careful about testing the code before I put it in the article, but I guess I haven't mastered the art of copy'n'paste, yet.
As much as I reread these things before I submit them, I also miss the occasional truncation of a word or the misspelling of "an" as "and" or have an out-of-place "the" in the text. I've found a couple of such errors, unfortunately, after the article was published. Guess I can't add "proof reader" to the resume.
Thanks again for the catch.
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
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."
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #612710
Anirban Paul
Anirban Paul
Posted Wednesday, December 03, 2008 7:58 AM
Hall of Fame
Group: General Forum Members
Last Login: Thursday, November 12, 2009 7:14 AM
Points: 3,295,
Visits: 964
Jeff excellent. Before reading this I was going through the discussion of your part 1 article. As I said before I learnt lot from your discussions also. :) This is awesome series.
:)
Post #612861
Jeff Moden
Jeff Moden
Posted Wednesday, December 03, 2008 8:00 AM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 11:38 PM
Points: 18,291,
Visits: 12,310
Thanks for the great feedback Anirban. Great to know that folks get things out of these articles. :)
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
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."
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #612864
Luke L
Luke L
Posted Wednesday, December 03, 2008 8:05 AM
SSCrazy
Group: General Forum Members
Last Login: Thursday, November 12, 2009 9:20 AM
Points: 2,069,
Visits: 2,959
Another Great article Jeff. Very informative and useful.
-Luke.
To help us help you
read this
For better help with performance problems please
read this
Post #612870
Goldie Graber
Goldie Graber
Posted Wednesday, December 03, 2008 8:08 AM
SSC-Addicted
Group: General Forum Members
Last Login: Yesterday @ 9:56 AM
Points: 407,
Visits: 1,031
Great article Jeff!
Do you think this will perform better than a dynamic pivot?
Post #612871
Paul DB
Paul DB
Posted Wednesday, December 03, 2008 8:13 AM
Valued Member
Group: General Forum Members
Last Login: Tuesday, November 10, 2009 9:14 AM
Points: 59,
Visits: 238
I also enjoyed the article. I like that you include applications and explanations of best some practices, e.g. the discussion on using a SELECT instead of an IF under the Variables for the Start and End Dates section. It is quite helpful that the article is linked to other articles for more basic information. I also like that you distinguish between a best practice and a my-preference.
Thanks. :)
Paul DB
Post #612876
Carla Wilson-484785
Carla Wilson-484785
Posted Wednesday, December 03, 2008 8:18 AM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Yesterday @ 9:37 AM
Points: 570,
Visits: 965
Awesome! Having spent years using all sorts of languages to prepare cross-tabs, I really love the results here.
I, too, went back and read the discussion on the first article. Actually, my main reason for this post is so I get emailed on this discussion! :)
Thanks, Jeff!
Post #612881
Jeff Moden
Jeff Moden
Posted Wednesday, December 03, 2008 8:25 AM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 11:38 PM
Points: 18,291,
Visits: 12,310
ggraber (12/3/2008)
Great article Jeff!
Do you think this will perform better than a dynamic pivot?
Thanks for the feedback and absolutely! :)
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
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."
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #612888
« Prev Topic
|
Next Topic »
98 posts, Page 1 of 10
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-2009 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use