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

 All Forums
 Site Related Forums
 Article Discussion
 A way to sort columns in the pivot

Author  Topic 

SubCreator
Starting Member

8 Posts

Posted - 2005-01-20 : 06:48:53
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

15732 Posts

Posted - 2005-01-20 : 06:57:49
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

8 Posts

Posted - 2005-01-20 : 08:55:42
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

15732 Posts

Posted - 2005-01-20 : 19:03:49
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
   

- Advertisement -