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 -> Re: Help with Psudo Column in SQL Statement

Re: Help with Psudo Column in SQL Statement

From: <fitzjarrell_at_cox.net>
Date: Wed, 29 Aug 2007 07:12:54 -0700
Message-ID: <1188396774.544081.99890@y42g2000hsy.googlegroups.com>


On Aug 29, 8:52 am, "ame..._at_iwc.net" <ame..._at_iwc.net> wrote:
> Hi All,
>
> I have a query in which I need the first column to basically be the
> row number. This is not the ROWNUM psudo column, just simply a
> counter. The query is below. I basically need the number of the row
> in the result set.......
>
> Any ideas how I can implement this into the current query???
>
> Thanks for your help.
>
> SELECT NULL, m.comp_name, m.ticker, NVL(sd.avg_rating,-9999),
> NVL(ROUND(sd.avg_rating_pr,2),-9999),
> NVL(sd.num_up_rating_1w,-9999),
> NVL(sd.num_dn_rating_1w,-9999)
> FROM master_table m, stock_data sd
> WHERE m.m_ticker=sd.m_ticker(+) AND avg_rating IS NOT NULL AND
> m.m_ticker IN
> (SELECT m_ticker FROM comp_ind WHERE ind_code = UPPER('197'))
> ORDER BY sd.avg_rating, m.comp_name;
>
> So:
>
> 1 ...data
> 2 ...data
> 3 ...data
> etc......

Why won't ROWNUM suffice?

David Fitzjarrell Received on Wed Aug 29 2007 - 09:12:54 CDT

Original text of this message

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