首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PLS-00103:遇到符号"ELSE“

PLS-00103:遇到符号"ELSE“
EN

Stack Overflow用户
提问于 2021-03-29 16:26:05
回答 1查看 52关注 0票数 0

我遇到了这个问题。

代码语言:javascript
复制
 case room_rec.roomID
 37        when null
 38        then v_counter := v_counter
 39        else  v_counter := v_counter+1
 40       end as counter;

显示此错误消息

代码语言:javascript
复制
LINE/COL ERROR
-------- -----------------------------------------------------------------
39/7     PLS-00103: Encountered the symbol "ELSE" when expecting one of
         the following:
         . ( * @ % & = - + ; < / > at in is mod remainder not rem
         <an exponent (**)> <> or != or ~= >= <= <> and or like like2
         like4 likec between || multiset member submultiset
         The symbol ";" was substituted for "ELSE" to continue.

40/6     PLS-00103: Encountered the symbol "END" when expecting one of the
         following:
         * & = - + ; < / > at in is mod remainder not rem
         <an exponent (**)> <> or != or ~= >= <= <> and or like like2

我希望明智地运行该案例,但错误消息多次弹出。

EN

回答 1

Stack Overflow用户

发布于 2021-03-29 16:28:34

你的代码应该是:

代码语言:javascript
复制
v_counter := case when room_rec.roomID is null
             then v_counter
             else v_counter+1
             end;
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66850905

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档