Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 A way to sort columns in the pivot
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

SubCreator
Starting Member

Norway
8 Posts

Posted - 01/20/2005 :  06:48:53  Show Profile  Visit SubCreator's Homepage  Reply with Quote
Hi

I'm one of those who finds the crosstab procedure useful.

But, is it some way I can sort the columns? I have this table, where the columns are numeric, they're actually NumberOfDaysFromToday.

But they're not sorted! And that's not very useful if you are supposed to see a progression over the last days :)

Anyone with an answer are welcome to answer.

--
SubCreator

robvolk
Most Valuable Yak

USA
15732 Posts

Posted - 01/20/2005 :  06:57:49  Show Profile  Visit robvolk's Homepage  Reply with Quote
There is a modification posted in the comments section of the article that sorts the pivot columns:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=6216
Go to Top of Page

SubCreator
Starting Member

Norway
8 Posts

Posted - 01/20/2005 :  08:55:42  Show Profile  Visit SubCreator's Homepage  Reply with Quote
I looked through the postings, but couldn't quite sort (there it is again) out which one it was.


--
SubCreator
Go to Top of Page

robvolk
Most Valuable Yak

USA
15732 Posts

Posted - 01/20/2005 :  19:03:49  Show Profile  Visit robvolk's Homepage  Reply with Quote
It's on page 3:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=6216&whichpage=3

About 5-6 posts down.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000