Created
October 14, 2012 13:41
-
-
Save turbanoff/3888631 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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