July 28, 2010 at 12:42 am
Does anyone know the source unpivot syntax? I cannot find it from google. Thanks!:-P
July 28, 2010 at 3:35 pm
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 🙂
November 15, 2012 at 6:30 pm
Check out this example using unpivot
November 15, 2012 at 7:43 pm
November 15, 2012 at 8:44 pm
changbluesky (7/28/2010)
Does anyone know the source unpivot syntax? I cannot find it from google. Thanks!:-P
The syntax is in this article along with perhaps a better way:
http://www.sqlservercentral.com/articles/CROSS+APPLY+VALUES+UNPIVOT/91234/
My thought question: Have you ever been told that your query runs too fast?
My advice:
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?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
Since random numbers are too important to be left to chance, let's generate some![/url]
Learn to understand recursive CTEs by example.[/url]
[url url=http://www.sqlservercentral.com/articles/St
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply