我想制作简单的区域:输入字段、向数据库发送请求的按钮和显示结果的只读字段。
这是 PL/SQL 代码:
begin
select
edrpou || '; ' || nameorg || '; ' || short_name || '; ' || address || '; ' || boss
into :P206_SEARCH_RESULT
from dual
left join (
select * from (
select
trim(d.edrpou) edrpou,
trim(d.nameorg) nameorg,
trim(d.short_name) short_name,
trim(d.address) address,
trim(d.boss) boss,
d.date_d,
max(d.date_d) over (partition by trim(d.edrpou)) max_date
from edrpou_ d
where trim(d.edrpou) = :P206_EDRPOU_SEARCH and trim(d.short_name) is not null and d.isactual = 1
) e
where e.date_d = e.max_date
) on 1=1;
end;
单击按钮后,Item
P206_SEARCH_RESULT
为空。我检查了查询,它在 Developer 中工作。