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: PL/SQL HELP NEEDED!!!!

Re: PL/SQL HELP NEEDED!!!!

From: Barney Gumble <duff.drinker_at_cornerpub.FUDD-SUX>
Date: Tue, 15 Jun 1999 10:08:16 +0200
Message-ID: <376609F0.EBB38C61@cornerpub.FUDD-SUX>


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!!!<<<"



Replace ".FUDD-SUX" with ".com" to reply. Received on Tue Jun 15 1999 - 03:08:16 CDT

Original text of this message

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