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: Numbers in Sequence

Re: Numbers in Sequence

From: <g>
Date: Fri, 15 Sep 2006 10:24:35 +0100
Message-ID: <UdadnWGP8_zq7JfYRVnyhA@bt.com>

"Reiro" <ReiroGP_at_gmail.com> wrote in message news:1158309880.511027.198200_at_b28g2000cwb.googlegroups.com...
> Hi ppl....
>
> i hav the foll: table in oracle... a sample table with just two columns
> will look lyk this:
>
> Name SEQ_number
> A 31
> A 33
> A 37
> B 2
> B 3
> B 6
> C 4
> C 7
> C 8
>
>
> the prob is that i need the numbers tfor each name to be in sequence
> starting from 1...
> to look lyk the foll:
>
>
> Name SEQ_number
> A 1
> A 2
> A 3
> B 1
> B 2
> B 3
> C 1
> C 2
> C 3
>
> Plzzz help...
> thx in advance :)
>

oops
a bit of pl sql would do the trick
1
select max seqnumber from x where name = y then do the insert

2
 use dif seq for each name

it's a bit hard to understand as you have not said the volumes involved Received on Fri Sep 15 2006 - 04:24:35 CDT

Original text of this message

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