Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL HELP NEEDED!!!!
Thanks for help! It almost work now. Now how do I put sequence value in procedure?
I need to create to records with the same key value (CustNO) whitch I get from
CustSeq.
It works when I put it into SQL (VALUES (CustSeq.NextVal, fname, lname)) but it
won't work
like this:
Thomas Kyte wrote:
> >CREATE OR REPLACE
> >Procedure pMakeCust(fname IN VarChar2, lname IN VarChar2) AS
> >
> > -- CustSeq is my sequence for key-generation.
> > nCustNO Number := CustSeq.NextVal;
> >
> >BEGIN
> >
> > INSERT INTO
> > Customers
> > (CustNO, Firstname, LastName)
> > VALUES
> > (nCustNO, fname, lname);
> >
> >--Here I'll have to have several another INSERT INTO
> >-- that will use same nCustNO
> >
> >END; -- procedure
What's wrong with this?
Thanks again for your time - BG :O)
--
"Your infatuation is based on a physical attraction.
Talk to the woman and you'll realize you have nothing
in common. >>>BURP!!!<<<"