Home » SQL & PL/SQL » SQL & PL/SQL » Sorting for stragg function column
icon1.gif  Sorting for stragg function column [message #253896] Wed, 25 July 2007 04:44 Go to next message
sibgat
Messages: 45
Registered: November 2006
Location: Chennai
Member

Hi,

For the below query/ result can i able to sort 'C,I,J,N,T,M' to bring my result for clo_id 1 to be 'C,I,J,M,N,T'


SELECT   lt.clo_id, stragg (lf.cuf_cd) bb
    FROM cnrlft01 lf JOIN cnrclt01 lt ON lt.clo_id = lf.clo_id
   WHERE lt.cus_id = 1407 AND lf.cus_id = 1407
GROUP BY lt.clo_id





CLO_ID BB
1      'C,I,J,N,T,M'
2      'S'
3      'S'
4      'D,E'
5      'J'
6      'T'
7      'C'
8      'C'
9      'T'
10     'C'
11     'A'




Thanks in advance
Regards
Sibghat
Re: Sorting for stragg function column [message #253916 is a reply to message #253896] Wed, 25 July 2007 05:26 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is a version of STRAGG that sorts the result on AskTom.

Regards
Michel
Previous Topic: Query to find Duplicate set of values
Next Topic: how to put record in error log file
Goto Forum:
  


Current Time: Sat Dec 10 18:56:52 CST 2016

Total time taken to generate the page: 0.04594 seconds