简体   繁体   English

在Oracle Apex错误中运行select语句

[英]Running select statement in Oracle Apex Error

I don't know everything about Oracle Apex yet, but When I run this code in Oracle developer it runs just as fine, but when I am using Oracle Apex and making an application through an sql query it gives me the error: 我还不了解有关Oracle Apex的所有信息,但是当我在Oracle开发人员中运行此代码时,它运行得一样好,但是当我使用Oracle Apex并通过sql查询制作应用程序时,出现了以下错误:

• Query cannot be parsed, please check the syntax of your query. •无法解析查询,请检查查询的语法。

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

Check the parsing schema of your APEX application. 检查您的APEX应用程序的解析架构。 The tables and are probabaly owned by a schema other than the default parsing schema of your APEX application. 这些表和可能是由APEX应用程序的默认解析架构以外的架构所拥有。

If the parsing schema of your APEX application has the required privileges to access the required tables and views, you may be able to get it working by prepending the objects owner schema name to the object for example: My_Table would become SomeSchema.My_Table . 如果您的APEX应用程序的解析模式具有访问所需表和视图所需的特权,则可以通过在对象所有者模式名称前添加对象来使它正常工作,例如: My_Table将变为SomeSchema.My_Table

Or you could create synonyms to the tables and views in the parsing schema referencing the objects in the owners schema: 或者,您可以在解析架构中为表和视图创建同义词,以引用所有者架构中的对象:

create synonym My_Table for SomeSchema.My_Table;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM