我正在尝试建立一个Oracle Apex网页。我有一个在Db Visualizer中运行的SQL查询,一切正常。它应该获取大约700万条记录,但由于限制了DB Vis中的行数,它只能获取1000条记录。
这是我的SQL查询:
select t.*, t.rowid from table t
where custedp =
( select min(custedp) from tablex
where fullorderno like substr('${ORD}$',1,8) || '%' );
我尝试通过一个页面项P2_new输入ORD变量,所以我的新SQL查询是
select t.*, t.rowid from table t
where custedp =
( select min(custedp) from tablex
where fullorderno like substr(:P2_new,1,8) || '%' );
我在网页新建(静态内容),页面项目(文本字段) p2_new和按钮提交中创建了一个区域,该区域将提交页面。在此之前,当我将新区域从页面根本不加载的静态内容更改为经典报表时,一切都很好。它有一个装载的..。在选项卡和地址栏上显示“关于:空白”。我尝试验证代码,它还向我展示了一个
ajax call returned server error ora-20001 :error at line 1 error when I
tried to validate the code using the in built validator .
发布于 2018-06-09 04:33:24
在一个页面上显示700万行时,您计划做什么?
无论如何:只要您导航到该页面,classic report的查询就会运行。多亏了|| '%'
,query可以在整个tablex
中搜索min(custedp)
,而无需等待您在P2_NEW
条目中输入内容并按下SUBMIT
按钮。所以,如果你等待足够长的时间,它可能会返回一些东西。
或者,修改该查询,使其在P2_NEW
包含某些值时运行。例如:
select t.*, t.rowid
from table t
where custedp = (select min(custedp)
from tablex
where 1 = case when :P2_NEW is null then 2
else 1
end
and fullorderno like SUBSTR(:P2_new,1,8) || '%'
);
此外,请考虑始终设置P2_NEW
的源,替换会话状态中的任何现有值。
https://stackoverflow.com/questions/50767289
复制相似问题