Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> How can I know how many same orderno is shown in rows sequentially?
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
![]() |
![]() |