-
Is it possible to insert into a table
using the record loaded from a cursor?
declare
cursor c_cursor is
select a,b,c from table;
begin
for c_rec in c_cursor
loop
insert into new_table (using record???)
end loop;
end;
Thanks,
Paul
-
-
okay...
How do I code it?
Thanks.
-
declare
cursor c_cursor is
select a,b,c from table;
begin
for c_rec in c_cursor
loop
insert into new_table (a_new, b_new, c_new)
values (c_rec.a,c_rec.v,c_rec.c);
end loop;
end;
/
-
what I was really after was to not to have to specify each of the value fields.
something like
insert into new_table record;
and have record represent all of the indivual fields.
It's just a pain because some of my cursors contain dozens of fields and it takes awhile to specify each and every field after the values clause.
Thanks for the help.
Paul
-
-
Originally posted by mrpaulwass
what
something like
insert into new_table record;
U can't do it.
in INSERT statment u must wrile VALUES and specify LIST of values.
regardless of u use scalar variables or object types or variable arrays..
-
Thanks...
Lazy programmer, always looking for a shortcut. That's me.
P
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|