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: rownum

Re: rownum

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Wed, 18 Aug 1999 19:53:37 +0200
Message-ID: <934998839.23505.0.pluto.d4ee154e@news.demon.nl>


This feature, the inline view, was introduced in Oracle 7.2. You should be able to use it in 8.0.5 without problem.

Hth,

Sybrand Bakker, Oracle DBA

Norris <johnnie_at_cooper.com.hk> wrote in message news:7pdjup$299s$1_at_adenine.netfront.net...
> I am using Oracle 8.0.5. What can I do?
>
>
> Connor McDonald <connor_mcdonald_at_yahoo.com> wrote:
> > Norris wrote:
> >>
> >> I want to use rownum as the sequence number in the report but the
result
> >> is not what I expect. What can I do?
> >>
> >> ------------------------------------------
> >> drop table abc
> >> /
> >> create table abc (a char(1))
> >> /
> >> insert into abc values ('B')
> >> /
> >> insert into abc values ('A')
> >> /
> >> select rownum,a
> >> from abc
> >> order by a
> >> /
> >> ROWNUM A
> >> ---------- -
> >> 2 A
> >> 1 B
> >> 2 rows selected.
> >>
> >> --
> >> --
> >> http://www.washington.edu/pine/faq/
>
> > rownum is assigned before the order-by clause is assigned...
>
> > in 8i you can perform things like
>
> > select * from
> > ( select blah
> > from table
> > order by 1,2,3)
>
> > which would allow the use of rownum like you are after, but if you are
> > using some sort of reporting tool, you'd probably be better off using a
> > built-in facility of the tool to number your records...
>
> > HTH
>
> > --
> > ===========================================
> > Connor McDonald
> > "These views mine, no-one elses etc etc"
> > connor_mcdonald_at_yahoo.com
>
> > "Some days you're the pigeon, and some days you're the statue."
>
> --
> =============================================================
> Opinions are mine and do not necessarily reflect those of the
> Corporation.
> http://www.ntfaq.com
> http://www.jsiinc.com/reghack.htm
> http://www.orafaq.org
> http://www.oconnell.net/Sybase_FAQ
> =============================================================
Received on Wed Aug 18 1999 - 12:53:37 CDT

Original text of this message

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