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 Jeff Moden
»
Cross Tabs and Pivots, Part 2 - Dynamic Cross...
126 posts, Page 1 of 13
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
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:10 PM
Points: 32,894,
Visits: 26,776
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 on T-SQL questions, 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: Wednesday, April 24, 2013 5:02 AM
Points: 2,365,
Visits: 1,825
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
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:10 PM
Points: 32,894,
Visits: 26,776
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 on T-SQL questions, 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
Anipaul
Anipaul
Posted Wednesday, December 03, 2008 7:58 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Today @ 6:03 AM
Points: 4,786,
Visits: 1,335
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
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:10 PM
Points: 32,894,
Visits: 26,776
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 on T-SQL questions, 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, May 16, 2013 1:12 PM
Points: 2,891,
Visits: 5,857
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 Lesser
Goldie Lesser
Posted Wednesday, December 03, 2008 8:08 AM
SSC-Addicted
Group: General Forum Members
Last Login: Tuesday, April 16, 2013 6:34 AM
Points: 476,
Visits: 1,361
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, May 14, 2013 12:07 PM
Points: 60,
Visits: 257
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
Ten Centuries
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 1:00 PM
Points: 1,349,
Visits: 1,737
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
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:10 PM
Points: 32,894,
Visits: 26,776
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 on T-SQL questions, 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 »
126 posts, Page 1 of 13
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.