Hi, I know this is probably going to be an easy one for most of you but I just can't figure it out. I'm not exactly a PL/SQL expert and I hope someone can help me out. I'm working on an Oracle 10g db and I need to insert data into a table. Simple enough... The table has 3 columns - colA will always have a value of 1, colB will be gotten from a different table using a pretty simple select and colC will always be NULL.
I've tried my hand at using PL/SQL :) but of course it didn't work. I figured I'd need to use a cursor since I'm going to be getting back more that 1 result on my select. Am I even a little close?
CURSOR curs IS
FOR curs_rec IN curs LOOP
insert into table1(colA, colB, colC) values (1, curs_rec, null);
THEN DBMS_OUTPUT.PUT_LINE('No more Data to be processed');