Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Help with Psudo Column in SQL Statement
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
![]() |
![]() |