【问题标题】:Oracle Apex- Branch to another page based on PL/SQL function bodyOracle Apex- 基于 PL/SQL 函数体跳转到另一个页面
【发布时间】:2017-08-29 14:42:42
【问题描述】:

我有一个“注册”页面,在该页面中我放置了一个提交按钮。单击提交按钮时,如果注册成功,我希望它将页面重定向到“成功”页面。

为了实现这一点,我创建了一个“分支”,其中“分支操作”是一个 PL/SQL 函数体,返回我希望它重定向的页码。 函数体为:

if (select count(username) from tuser_info where upper(username) = upper(:p2_username) > 0) 
then return '3';
else return '4';

但是这个块给出了这个错误:

ORA-06550:第 1 行,第 49 列:PLS-00103:在预期以下情况之一时遇到符号“SELECT”:( - + case mod new not null continue avg count current exists max min prior sql stddev sum variance执行 forall 合并时间时间戳间隔 date '具有字符集规范的字符串文字' 'a number' '单引号 SQL 字符串' pipe '带有字符集的交替引用的字符串文字 s

谁能帮我解决这个问题???

【问题讨论】:

    标签: oracle oracle-apex oracle-apex-5.1


    【解决方案1】:

    我终于解决了这个问题。

    我的 PL/SQL 函数体中有一些错误。应该是:

    declare
        total number;
    begin
        total := 0;
        select count(username) into total from tuser_info where upper(username) = upper(:p2_username);
        if (total > 0) then return '3';
        else return '4';
        end if;
    end;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-08-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-20
      • 1970-01-01
      相关资源
      最近更新 更多