Home » SQL & PL/SQL » SQL & PL/SQL » Sorting for stragg function column  () 1 Vote
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: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
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: Fri Dec 06 23:43:22 CST 2024