Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00913: too many values

hemuJan 30 2013 — edited Jan 30 2013
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2013
Added on Jan 30 2013
3 comments
686 views