hiiii
i am trying below query
declare
m varchar2(3):='SHR';
m1 varchar2(4000);
begin
for x in
(
select tname from tab where tname in
( ac_mat,prd_mast
)
)
loop
if x.tname='ac_mast' then
m1:='insert into '||x.tname||' select * from '|| x.tname || '@report2shr where trim(substr(prdacctid,1,8))= '||''''||m||'''';
else
m1:='insert into '||x.tname||' select * from '|| x.tname ||'@report2shr';
end if;
--dbms_output.put_line (m1);
execute immediate m1;
dbms_output.put_line('inserting into ' || x.tname);
END LOOP;
END;
i getting error as
ORA-00913: too Many Values
REPORT2SHR is a dblink
please help
Edited by: hemu on 30-Jan-2013 00:23