首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

PLS-00103解决思路

2013-10-15 
PLS-00103create or replace procedure sp_part_ticketdate(i_startday in number,i_endday in number) is

PLS-00103

create or replace procedure sp_part_ticketdate(
i_startday in number,
i_endday in number
) is
v_partname varchar2(30);
v_fornum number;
begin
  
  if i_startday<i_endday then
    --v_fornum:=i_startday;
    v_partname:='part'||to_char(v_fornum);
    for v_fornum in i_startday..i_endday loop
      alter table tb_dw_ticketdate add partition v_partname values(to_char(v_fornum));

    end loop;
  end if;
end sp_part_ticketdate;

PROCEDURE SCOTT.SP_PART_TICKETDATE 编译错误

错误:PLS-00103: 出现符号 "ALTER"在需要下列之一时:
        ( begin case declare exit
          for goto if loop mod null pragma raise return select update
          while with <an identifier>
          <a double-quoted delimited-identifier> <a bind variable> <<
          continue close current delete fetch lock insert open rollback
          savepoint set sql execute commit forall merge pipe purge
行:13
文本:alter table tb_dw_ticketdate add partition v_partname values(to_char(v_fornum));


[解决办法]

execute immediate 'alter table....';

热点排行