Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Copy a record from 1-table to another
Greetings...
This is an extremely simplified version of the actual problem, just to make it easier.
I have 2-tables: R(a) and S(a,b)
I want to do the following (which doesn't work), and I don't know what
I need to do to
make it work. This is on a Oracle 9i system.
cursor c1 is select * from r;
r_rec c1%ROWTYPE;
begin
open c1;
loop
fetch c1 into r_rec; exit when c1%NOTFOUND;
insert into s values r_rec; end loop;
I tried something like: insert into s values(r_rec,1) as well, but that is syntactically incorrect.
Anyone have any suggestions?
Thanks,
Joe
Received on Wed Dec 14 2005 - 14:54:33 CST
![]() |
![]() |