Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Request PL/SQL Help
Thanks for the response. What I needed was the sequence numbering to restart for each employee.
"Doug O'Leary" <dkoleary_at_mediaone.net> wrote in message
news:MPG.15a58214d8ed9fb69897a7_at_news.randori.com...
> Hey;
>
> I must be missing something...
>
> SQL> select * from seq1;
>
> EMPLID START_DT SEQUENCE_NBR
> ---------- -------- ------------
> 1 01/01/01 1
> 2 01/02/01 1
> 3 01/03/01 1
> 4 01/04/01 1
> 5 01/05/01 1
> [[ snip ]]
> 47 02/16/01 1
> 48 02/17/01 1
> 49 02/18/01 1
> 50 02/19/01 1
>
> 50 rows selected.
>
> SQL> update seq1
> 2 set sequence_nbr = keys.nextval;
>
> 50 rows updated.
>
> SQL> select * from seq1;
>
> EMPLID START_DT SEQUENCE_NBR
> ---------- -------- ------------
> 1 01/01/01 1
> 2 01/02/01 2
> 3 01/03/01 3
> 4 01/04/01 4
> 5 01/05/01 5
> [[ snip ]]
> 47 02/16/01 47
> 48 02/17/01 48
> 49 02/18/01 49
> 50 02/19/01 50
>
> 50 rows selected.
>
> This sounds like what you were asking for... What did I miss?
>
> Doug
>
> --
> -------------------
> Douglas K. O'Leary
> Senior System Administrator
> dkoleary_at_mediaone.net
Received on Fri Jun 29 2001 - 17:44:03 CDT
![]() |
![]() |