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
»
SQL Server 2008
»
SQL Server 2008 - General
»
source unpivot(PIVOT and UNPIVOT)
source unpivot(PIVOT and UNPIVOT)
Rate Topic
Display Mode
Topic Options
Author
Message
changbluesky
changbluesky
Posted Wednesday, July 28, 2010 12:42 AM
SSC Rookie
Group: General Forum Members
Last Login: Monday, November 01, 2010 4:19 AM
Points: 39,
Visits: 150
Does anyone know the source unpivot syntax? I cannot find it from google. Thanks!
Post #959852
torpkev
torpkev
Posted Wednesday, July 28, 2010 3:35 PM
SSC Veteran
Group: General Forum Members
Last Login: Friday, August 26, 2011 7:59 AM
Points: 238,
Visits: 432
look through this post by pinal dave
http://blog.sqlauthority.com/2008/05/29/sql-server-unpivot-table-example/
--------------------------
I long for a job where my databases dont have any pesky users accessing them :)
Post #960385
rdavidian
rdavidian
Posted Thursday, November 15, 2012 6:30 PM
SSC Journeyman
Group: General Forum Members
Last Login: Yesterday @ 7:47 AM
Points: 84,
Visits: 433
Check out this example using unpivot
http://wordpress.robertdavidian.com/?p=12
Post #1385410
starshayiz
starshayiz
Posted Thursday, November 15, 2012 7:43 PM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, November 15, 2012 7:33 PM
Points: 9,
Visits: 0
Post #1385424
dwain.c
dwain.c
Posted Thursday, November 15, 2012 8:44 PM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 12:42 AM
Points: 2,338,
Visits: 3,158
changbluesky (7/28/2010)
Does anyone know the source unpivot syntax? I cannot find it from google. Thanks!
The syntax is in this article along with perhaps a better way:
http://www.sqlservercentral.com/articles/CROSS+APPLY+VALUES+UNPIVOT/91234/
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 #1385438
« 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.