首页 > 其他 > 详细

编译后错误提示为pls-00103:出现符号""在需要下列之一时:begin case declare

时间:2020-06-27 17:59:45      阅读:151      评论:0      收藏:0      [点我收藏+]
转自:https://www.cnblogs.com/songdavid/archive/2011/09/13/2174908.html

create or replace trigger auth_secure
 before insert or update or delete --/对整表更新前触发
  on g002
begin
 IF to_char(sysdate,‘DY‘,‘nls_date_language=american‘)
in (‘THU‘) then
Raise_application_error(-20001, ‘ou dont have access to modify this table.‘);
 End if;
End ;

编译后错误提示为:
5 pls-00103:出现符号""在需要下列之一时:begin case declare exit for goto if loop mod null pragma raise return select update while with ...
8 pls-00103:出现符号""在需要下列之一时:begin case declare else elseif end exit for goto if loop mod null pragma raise return select update while with ...

 

原因分析:

肉眼看不到的,有可能是全角的空格
create or replace trigger auth_secure
 before insert or update or delete --/对整表更新前触发
  on g002
begin
IF to_char(sysdate,‘DY‘,‘nls_date_language=american‘) --前面可能是全角的空格
in (‘THU‘) then
Raise_application_error(-20001, ‘ou dont have access to modify this table.‘);
End if; --前面可能是全角的空格
End ;

 

这行代码前IF to_char(sysdate,‘DY‘,‘nls_date_language=american‘)
有两个不可见的控制符(看似空格,其实编码为A1,十进制161),这是导致编译错误的原因
同样语句End if; 前面也有两个。
删除后应该编译OK
不知在什么地方复制的

解决办法:

因为是从别处复制的代码,可能有非法字符,删除了重新写一遍就可以了!

编译后错误提示为pls-00103:出现符号""在需要下列之一时:begin case declare

原文:https://www.cnblogs.com/bibi-feiniaoyuan/p/13198788.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!