Try this:
DECLARE
col_1 NUMBER;
BEGIN
SELECT col_1_seq.NEXTVAL
INTO col_1
FROM dual;
INSERT INTO table (col_1)
VALUES (col_1);
END;
Pamela
-----Original Message-----
From: Martin Jones
[mailto:oracledba-ezmlmshield-x6554247.[Email address protected]
Sent: Thursday, November 11, 2004 11:13 PM
To: LazyDBA Discussion
Subject: insert in a stored procedure
How can I use an insert statment in a stored procedure where I need to get
the next sequential number of one of the columns and add that to the insert
statement? Thank-you, Marty
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com To unsubscribe: see
http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com By using this list you agree to
these terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page