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 Bernabe Diaz
»
Manipulate Horizontal Hierarchy with UNPIVOT
Manipulate Horizontal Hierarchy with UNPIVOT
Rate Topic
Display Mode
Topic Options
Author
Message
diaz.bernabe
diaz.bernabe
Posted Thursday, December 20, 2012 3:45 AM
Old Hand
Group: General Forum Members
Last Login: Yesterday @ 9:35 AM
Points: 313,
Visits: 167
Comments posted to this topic are about the item
Manipulate Horizontal Hierarchy with UNPIVOT
Post #1398888
dwain.c
dwain.c
Posted Tuesday, January 15, 2013 11:37 PM
SSCrazy
Group: General Forum Members
Last Login: Today @ 9:30 PM
Points: 2,340,
Visits: 3,169
You might want to look into using the CROSS APPLY VALUES approach to UNPIVOT (see the first article in my signature links). I find it much more readable that multiple UNPIVOTs and it seems to perform better as well.
No loops! No CURSORs! No RBAR! Hoo-uh!
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?
Since random numbers are too important to be left to chance, let's generate some!
Are you too recursively challenged?
Splitting strings based on patterns can be fast!
Post #1407622
diaz.bernabe
diaz.bernabe
Posted Tuesday, April 30, 2013 9:25 PM
Old Hand
Group: General Forum Members
Last Login: Yesterday @ 9:35 AM
Points: 313,
Visits: 167
Thanks!, good stuff! I will practice your technic!
Cheers!
Post #1448295
« Prev Topic
|
Next Topic »
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.