【问题标题】:Running select statement in Oracle Apex Error在 Oracle Apex 错误中运行 select 语句
【发布时间】:2015-09-10 13:15:52
【问题描述】:

我还不了解有关 Oracle Apex 的所有信息,但是当我在 Oracle 开发人员中运行此代码时,它运行得一样好,但是当我使用 Oracle Apex 并通过 sql 查询创建应用程序时,它给了我错误:

• 无法解析查询,请检查查询的语法。

with x as (
select count(cou_code) as changes, state_code from sdrp15_submission_log sl
where  state_code in (select distinct state_code from sdrp15_submission_log
                       where  state_code = sl.state_code
                       and    cou_code  != 'All')
and   qa_date  is null
and   phase = 'A'                      
group by state_code)
, y as (select count(cou_code) as cnt, st_code
from   sdrp15_cosd
where  st_code = (select distinct state_code 
                from sdrp15_submission_log
                where  state_code = st_code
                and    cou_code   = 'All'
                and    phase = 'A'
                and    qa_date is null)
and   phase = 'A'
group by st_code)
select x.state_code, x.changes+y.cnt
from x join y on x.state_code = Y.st_code

【问题讨论】:

  • 错误消息是否比"Query cannot be parsed, please check the syntax of your query" 更多?
  • 它说“表或视图不存在,但这没有意义,因为它在我的 sql 开发人员中运行。

标签: sql oracle


【解决方案1】:

检查您的 APEX 应用程序的解析架构。这些表 和 可能由您的 APEX 应用程序的默认解析架构以外的架构拥有。

如果您的 APEX 应用程序的解析架构具有访问所需表和视图所需的权限,您可以通过将对象所有者架构名称添加到对象来使其工作,例如:My_Table 将变为 @ 987654322@.

或者您可以在解析模式中创建表和视图的同义词,并引用所有者模式中的对象:

create synonym My_Table for SomeSchema.My_Table;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-25
    • 2013-12-21
    • 2013-09-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多