编译SP的时候提示PLS-00103:出现符号错误‘;’语句如下,请大伙指点
create or replace procedure zybp(product in varchar2) is
num number;
begin
select count(1) into num from user_tables where table_name = 'zybp';
if num>0 then
drop table zybp;
end if;
create table zybp as
select fitemno from pmscpartt where fpditemno=product and sysdate between fvaliddte and finvaliddte and fitemno not in
(select fchilditemno from strctm where sysdate between fstrvaliddte and fstrinvaliddte and
fparentitemno not in(select product from dual
union all
select fpmcode from pmstrctm where fitemno=product
union all
select fchilditemno from strctm a,itemm b where a.fchilditemno=b.fitemno
and b.fitemtyp in ('PH','M') and fparentitemno =product
union all
select fchilditemno from strctm a,itemm b where a.fchilditemno=b.fitemno
and b.fitemtyp in ('PH','M') and fparentitemno in
(select fchilditemno from strctm a,itemm b where a.fchilditemno=b.fitemno
and b.fitemtyp in ('PH','M') and fparentitemno =product)));
end;
create or replace procedure zybp(product in varchar2) is
num number;
begin
select count(1) into num from user_tables where table_name = 'zybp';
if num>0 then
drop table zybp;
end if;
create table zybp as
select fitemno from pmscpartt where fpditemno=product and sysdate between fvaliddte and finvaliddte and fitemno not in
(select fchilditemno from strctm where sysdate between fstrvaliddte and fstrinvaliddte and
fparentitemno not in(select product from dual
union all
select fpmcode from pmstrctm where fitemno=product
union all
select fchilditemno from strctm a,itemm b where a.fchilditemno=b.fitemno
and b.fitemtyp in ('PH','M') and fparentitemno =product
union all
select fchilditemno from strctm a,itemm b where a.fchilditemno=b.fitemno
and b.fitemtyp in ('PH','M') and fparentitemno in
(select fchilditemno from strctm a,itemm b where a.fchilditemno=b.fitemno
and b.fitemtyp in ('PH','M') and fparentitemno =product)));
end;
需要用
execute immeidate 'drop table zybp';
代替你procedure中的语句
drop table zybp;
execute immeidate 'drop table zybp';