Create or replace PROCEDURE scott.P_Update_Search_ Authority
/*
      CC 2006-12-5
      功能描述:
           增加特殊权限用户权限维护表的一行,
就是当前的出版社给予当前书店查询的权限
      入口参数:
           vPublishID:       出版社ID号
           vPublishName:    出版社名称
           vOperate:         操作标志
      出口参数:
           ReturnText:      返回操作代码
 */
  
(
vPublishID  in Varchar2, 
 vOperate        in   Varchar2, 
 ReturnText  out Varchar2
) AS
 
vPublishName  in Varchar2, 
 vCount in   integer,BEGIN
Select count(*) 
Into vCount
from system.NSOwnerAuthority
Where OwnerID= vPublishID;If vCount=0 and vOperate=0 then
ReturnText := '';
Goto loop_end;
Else if vCount=1 and vOperate=1 then
ReturnText := '';
Goto loop_end;
Else If vCount=1 and vOperate=0 then
Delete from system. NSOwnerAuthority
Where OwnerID= vPublishID;
exception 
when others then
        ReturnText := '信息删除失败:'+ vPublishID + ' ' + vBookshopID;
END IF;
Else If vCount=0 and vOperate=1 then
select Client_Name
    into  vPublishName
    from  system.tClient_ID 
    where Client_No=vPublishID;
exception 
when others then
    ReturnText := '出版社代码无效';
END IF; Insert into system. NSOwnerAuthority
( OwnerID, OwnerName, ClientID, ClientName, Authority )
Values ( vPublishID, vPublishName, vBookshopID, vBookshopName '1' )
exception 
when others then
        ReturnText := '信息增加失败:'+ vPublishID + ' ' + vBookshopID;
END IF;
End if<<loop_end>>
END;
/发生警告:  Warning: Procedure created with compilation errors.SQL>show error 
出现下面的提示:LINE/COL ERROR
-------- -----------------------------------------------------------------
1/34     PLS-00103: Encountered the symbol "AUTHORITY" when expecting one
         of the following:
         ( ; is with authid as cluster compress order using compiled
         wrapped external deterministic parallel_enable pipelined19/3     PLS-00103: Encountered the symbol "AS" when expecting one of the
         following:
         ; is return
请大家帮忙看一下吧.谢谢

解决方案 »

  1.   

    Create or replace PROCEDURE scott.P_Update_Search_ Authority 
    /* 
          CC 2006-12-5 
          功能描述: 
               增加特殊权限用户权限维护表的一行, 
    就是当前的出版社给予当前书店查询的权限 
          入口参数: 
               vPublishID:       出版社ID号 
               vPublishName:    出版社名称 
               vOperate:         操作标志 
          出口参数: 
               ReturnText:      返回操作代码 
     */ 
       

    vPublishID  in Varchar2,  
     vOperate        in   Varchar2,  
     ReturnText  out Varchar2 
    ) AS 
    ----------
    AS 改成 IS
      

  2.   


    爱新觉罗至尊宝:你好!
    我按你说的改了,又出现了下面的错误,请再看看LINE/COL ERROR
    -------- -----------------------------------------------------------------
    24/15    PLS-00103: Encountered the symbol "IN" when expecting one of the
             following:
             constant exception <an identifier>
             <a double-quoted delimited-identifier> table LONG_ double ref
             char time timestamp interval date binary national character
             nchar24/15    PLS-00103: Encountered the symbol "IN" when expecting one of the
             following:
             constant exception <an identifier>
             <a double-quoted delimited-identifier> table LONG_ double refLINE/COL ERROR
    -------- -----------------------------------------------------------------
             char time timestamp interval date binary national character
             nchar
      

  3.   

    ReturnText :=  '信息删除失败: '+ vPublishID +  '  ' + vBookshopID; 
    这个改成
    ReturnText :=  '信息删除失败: '|| vPublishID ||  '  ' || vBookshopID; 
    你那两个错我看不到,你把修改后的代码再贴出来吧。