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 question with rownum!

Sql question with rownum!

From: Yanick Hudon <yannik_at_sympatico.ca>
Date: Sun, 2 Jun 2002 00:36:23 -0700
Message-ID: <8vhK8.19654$Sn2.2755157@news20.bellglobal.com>


Hi all,

    I have a little question in Sql :

    I want to use the rownum pseudocolumn to count the records in a     select statement with a group by.... Is it possible, if yes, how i do that.

    The following tables/result represent an example of what i want.

    After the 1st Query (The one that i group by) , i get the result:

    ColumnName        Count(*)
    =========        ======

    Data1                        2
    Data2                        15

    The following table represent what i want:

    RowNum            ColumnName
    ======             =========
        1                        Data1
        2                        Data1
        1                        Data2
        2                        Data2
        3                        Data2
        4                        Data2
        ...                       Data2
        15                      Data2

    Thanks in advance for your help Received on Sun Jun 02 2002 - 02:36:23 CDT

Original text of this message

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