Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Sql Order by question

Sql Order by question

From: m&m <milin.sheth_at_gmail.com>
Date: Fri, 19 Oct 2007 21:35:33 -0000
Message-ID: <1192829733.976250.291730@t8g2000prg.googlegroups.com>


Hello,

        Can somebody help me resolve following order by problem, I am running out of ideas.

        I have following temp table with following data

        CREATE TABLE TEMP
       (COL1  NUMBER,
        COL2  NUMBER
       )

       Data

        COL1 COL2

              1     1
              1     2
              1     3
              3     4
              2     5
              1     6
              1     7
              2     8
              2     9
              3     10

         I want the returned data to be ordered by as

           COL1               COL2

                1                  1
                1                  2
                1                  3
                1                  6
                1                  7
                3                  4
                3                  10
                2                  5
                2                  8
                2                  9

          Is this possible using sql query?

Thanks Received on Fri Oct 19 2007 - 16:35:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US