Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How can I know how many same orderno is shown in rows sequentially?

How can I know how many same orderno is shown in rows sequentially?

From: deneb <cygdeneb_at_yonsei.ac.kr>
Date: Sun, 07 Oct 2007 19:26:52 -0700
Message-ID: <1191810412.702056.196540@50g2000hsm.googlegroups.com>


hi there,

I have a table that has below columns and rows.

                DAY         SEQ         ORDERNO

-----------------------------------------------------------------
20071002 1 LM001 20071002 2 LM001 20071002 3 LM003 20071002 4 LM003 20071002 5 LM005 20071002 6 LM001 20071002 7 LM002 20071002 8 LM002 20071002 9 LM002 20071002 10 LM001 20071002 11 LM001 20071002 12 LM004 20071002 13 LM004

How can I get a datas like this ?

ORDERNO COUNT


LM001          2
LM003          2
LM005          1
LM001          1
LM002          3
LM001          2
LM004          2


That is, how can I know how many same orderno is shown in rows sequentially?
I'm using oracle 9i. PL-SQL statements could be used. Received on Sun Oct 07 2007 - 21:26:52 CDT

Original text of this message

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