当前位置: 代码迷 >> Oracle技术 >> 数据库存储方式出错!pts-00103,该怎么处理
  详细解决方案

数据库存储方式出错!pts-00103,该怎么处理

热度:130   发布时间:2016-04-24 08:28:57.0
数据库存储方式出错!!!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:

  := . ( @ % ;
The symbol "{" was ignored.

------解决方案--------------------
这么明显的错误提示呀,多了个{
SQL> exec mass_rule(10000,200000)

------解决方案--------------------
create or replace procedure mass_rule (maxcountshuxing,maxcountpeople)
先不说执行,就这一句能编译通过?
------解决方案--------------------
SQL> exec mass_rule{(10000,200000)
 
------解决方案--------------------
计算机不是中文的错,要是报中文错,咱就看懂了!
------解决方案--------------------
探讨
create or replace procedure mass_rule (maxcountshuxing,maxcountpeople)
先不说执行,就这一句能编译通过?