Home » SQL & PL/SQL » SQL & PL/SQL » Sorting of Data (Oracle 10g)
Sorting of Data [message #629606] Fri, 12 December 2014 02:42 Go to next message
Mayur Shinde
Messages: 60
Registered: August 2014
Location: Pune, Maharashtra
Member
Hi all,
Table Structure:
------------------------
Name Null? Type
----------------------------------------- -------- ------------
A NOT NULL VARCHAR2(6)
B NOT NULL VARCHAR2(2)
C NOT NULL NUMBER(6,3)
D NOT NULL NUMBER(7,3)

In output Column B should be ascending and column D should be descending.

Table Data:
-----------------
A B C D
------ -- ---------------- ------------
150028 S1 21 2
150028 S1 21 12.6
150028 S1 21 12
150028 S1 21 10.7
150028 S1 21 1.5
150028 S2 26 49
150028 TK 9 9.5
150028 TK 9 9.2
150028 TK 9 4.2
150028 TK 9 1.5
150028 TK 9 1.8

Thank you.

[Updated on: Fri, 12 December 2014 02:55]

Report message to a moderator

Re: Sorting of Data [message #629607 is a reply to message #629606] Fri, 12 December 2014 02:50 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
order by b asc, d desc
Re: Sorting of Data [message #629608 is a reply to message #629606] Fri, 12 December 2014 03:24 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

From your previous topic:

BlackSwan wrote on Tue, 23 September 2014 15:07
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/ and read http://www.orafaq.com/forum/t/174502/


Michel Cadot wrote on Tue, 23 September 2014 15:19

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Before, Please read How to use [code] tags and make your code easier to read.

Re: Sorting of Data [message #629619 is a reply to message #629606] Fri, 12 December 2014 07:17 Go to previous message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
I see you have used your email address as your username in the forum.
I hope you enjoy having your mailbox flooded with offers for certain, uh, 'anatomical enhancement' products and opportunities to become wealthy if you will help launder money out of Nigeria by providing access to your bank account. Every web crawler on the planet is already harvesting your email address for such.
Previous Topic: Getting a word which contains some strings
Next Topic: PL/SQL Script execution metics in Oracle
Goto Forum:
  


Current Time: Fri Apr 26 20:31:11 CDT 2024