Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pl/sql and inserts

Status
Not open for further replies.

sammybee

Programmer
Sep 24, 2003
103
GB
Hi all,

I need some help, I'm trying to convert a dbms_output into an insert statement for a temporary table. My line of code previously read "dbms_output.put_line ('statement for'||m1.numref)"

I've replaced this with an insert into table set num_ref = m1.numref

What am I doing wrong please help.

Cheers Sam
 
the syntax for insert is

Insert into Table (RequiredField1, RequiredField2...) values (Value1, Value2...)

Any fields you don't specify will be inserted as null, unless there is a not null constraint on this field, in which case an error will be raised.

Mark [openup]
 
Hi Mark,

I have this part correct now, sorry to be a pain, but I've changed by dbms statement for an insert statement and now the script errors on the declared parameters held before the cursor, the parameters are only used in the select to variables. Any ideas?

Many thanks

Sam
 
No worries MArk,

I think I've found the problem. Thank you for your help!

Cheers

Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top