数据库存储方式出错!!!pts-00103 create or replace procedure mass_rule (maxcountshuxing,maxcountpeople)as
sqlstr varchar2(1024); shuxing number(9) := 0; people number(9) := 0; Rvalue number := 1; maxshuxing number :=maxcountshuxing; maxpeople number :=maxcountpeople;
begin sqlstr := 'delete from BASE_OBJECT '; execute immediate sqlstr; commit; sqlstr := 'delete from BASE_OBJECT_ATTRIBUTE '; execute immediate sqlstr; commit;
while people<maxpeople Loop sqlstr := 'insert into BASE_OBJECT (Object_ID, OBJECT_NAME )values (SEQ_Base_object.nextval,'111111')'; execute immediate sqlstr; commit; people :=people+1; while shuxing < maxshuxing Loop sqlstr := 'insert into BASE_OBJECT_ATTRIBUTE (ATTRIBUTE_ID, OBJECT_ID, DEAL_STATE,attribute_type,attribute_value )values (SEQ_Base_object_attribute.nextval,SEQ_Base_object.currval,0,8,'||to_char(Rvalue)||')'; execute immediate sqlstr; commit; Rvalue := Rvalue+1; shuxing :=shuxing+1; end Loop; end Loop;
end; /
SQL> exec mass_rule{(10000,200000)
begin mass_rule{(10000,200000); end;
ORA-06550: line 2, column 16: PLS-00103: Encountered the symbol "{" when expecting one of the following: