Re: Row count in group

From: <xbguan_at_yahoo.com>
Date: Thu, 19 Aug 1999 13:39:20 GMT
Message-ID: <7ph1e6$rhm$1_at_nnrp1.deja.com>


Is the rownum fixed? If so, it won't sort the way in the original question.

In article <qhRu3.3176$9K.4023_at_news.rdc1.nj.home.com>,   "Paul Dorsey" <pdorsey_at_dulcian.com> wrote:
> Just add rownum to the select statement. e.g.
>
> select dept_id, rownum, emp_id,name
>
> rownum is a reserved word that will do what you want.
>
> --
> Paul Dorsey
> Dulcian, Inc.
> www.dulcian.com
> 212 595 7223
> P.S.
> If you would like to talk to Dulcian about a salaried position on our
team,
> please call me.
> We have openings in NJ for developers, in CA for PERL developers.
>
> Agi wrote in message <7pgis7$hff$1_at_nnrp1.deja.com>...
> >Hi,everyone,
> > I have a problem about row counter.
> > If I have a table likes follows
> >
> > dept_id emp_id name
> > ------- ------ -------
> > 101 1 Mary
> > 101 12 John
> > 101 33 Tom
> > 102 24 Jim
> > 102 25 Peter
> > ......
> > 109 300 King
> >
> > Is it possible to get the result via SQL*PLUS ??
> >
> >
> > dept rowcnt emp_id name
> > 101 1 1 Mary
> > 2 12 John
> > 3 33 Tom
> >
> > 102 1 24 Jim --row# reset on dept
> > 2 25 Peter
> > ....
> >
> > I knew it's easy without row# shown,but how to add row counter ??
> >
> > Is it possible in sqlplus ??
> > Any idea ??
> >
> >Rgds,
> >Agi
> >
> >
> >
> >Sent via Deja.com http://www.deja.com/
> >Share what you know. Learn what you don't.
>
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Aug 19 1999 - 15:39:20 CEST

Original text of this message