Skip to content

Instantly share code, notes, and snippets.

@turbanoff
Created October 14, 2012 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save turbanoff/3888633 to your computer and use it in GitHub Desktop.
Save turbanoff/3888633 to your computer and use it in GitHub Desktop.
create or replace procedure COPY_FROM_TABLE_PRIMER
as
begin
for REC in (
select TABLE_NAME
from TABLE_PRIMER2
) loop
execute immediate 'insert into ' ||REC.TABLE_NAME ||' (DAT, DAT2) select DAT, DAT2 from TABLE_PRIMER where substr(DAT, 1, 3)='''||REC.TABLE_NAME||'''';
commit;
end loop;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment