Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oder By

Status
Not open for further replies.

campbere

Technical User
Oct 10, 2000
146
US
I am trying to order a select statement that has 3 columns: Volume, Issue, and Title.

I want the select statement to order it by volume and issue, but I am not getting the proper results.

If I have:
Volume Issue Title
1 1 Help Me
1 3 Help Me
2 4 Help Me
2 1 Help Me
1 2 Help Me
2 3 Help Me
2 2 Help Me

I want:
Volume Issue Title
2 4 Help Me
2 3 Help Me
2 2 Help Me
2 1 Help Me
1 3 Help Me
1 2 Help Me
1 1 Help Me

I have beeen able to order the volume, or the issue but never both of them. I also need the results as shown to be in descending order.

Thanks.
 
have you tried...

order by volume, issue desc

I would have thought this would do it if not try

order by to_number(volume), to_number(issue) desc

I would only have thought that this would help if the columns are defibned as varchar2 columns.

HTH,

Mike.
 
I got it to work now. I needed to put volume desc, issue desc.


Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top