Sorting Data in Reports [message #249397] |
Wed, 04 July 2007 05:19 |
|
Dear Members,
I have report in which Iam grouping the data by a field known as "MONTH".
Iam picking the value of MONTH as follows:
to_char(Intimation_Date,'MON')
Here Intimation_Date is a column in the table which stores the date.
From this date Iam picking the value of month.
For Example if the Intimation_Date =12-Jun-2007 then MONTH will have the value "JUN".
And now Iam sorting the data month wise by grouping left based on the value of MONTH.
But my output is getting sorted based on the alphabetic order.
But I want it to sort month wise.
In brief my data is sorted like April,August,Feb,etc..
But I want it to sort by month order like Jan,Feb,Mar etc,,
Can any one let me know how to acheive this?
Best Regards & Thanks
|
|
|
Re: Sorting Data in Reports [message #249414 is a reply to message #249397] |
Wed, 04 July 2007 07:05 |
ab_trivedi
Messages: 460 Registered: August 2006 Location: Pune, India
|
Senior Member |
|
|
one thing you can do is that a add a column, store values 1 for jan, 2 for feb, 3 for mar and more and sort the data according to that. Then I hope you can able to do that.
Ashu
|
|
|
|
|
Re: Sorting Data in Reports [message #250870 is a reply to message #249397] |
Wed, 11 July 2007 12:09 |
skooman
Messages: 913 Registered: March 2005 Location: Netherlands
|
Senior Member |
|
|
smruti wrote on Mon, 09 July 2007 01:20 | it will work...
|
No dear, it will not work. You're converting a date to a varchar2, so sorting will be done alphabetically.
|
|
|