APEX 5 - 我有一个来自以下语句的经典报告(基于函数):
declare
bamsan varchar(3000);
begin
if v('foo')= 'lansan' then
bamsan := 'select id, cpu_cores, cpu_model, disk_gb from physical_servers where PHYSICALSERVERID like (select LEFTPHYSICALDEVICEID from SAN_PHYS_CON where CONNECTIONID like :meklet_value)';
elsif v('foo')= 'storage' then
bamsan := 'select id, modelis, customerstoragename from storages where storageid like :meklet_value';
elsif v('foo')= 'clusters' then
bamsan := 'select id, memberhostid from clusters_pools where clusterpoolid = :meklet_value';
elsif v('foo')= 'hostname' then
bamsan := 'select id, cpu_cores, cpu_model, disk_gb from physical_servers where PHYSICALSERVERID like (select parentid from hosts where hostname like :meklet_value)';
else
bamsan := 'select id, cpu_cores, cpu_model, disk_gb from physical_servers where PHYSICALSERVERID like :meklet_value';
end if;
return bamsan;
end;
选择elsif v('foo')= 'clusters'...
带来了错误:
ORA-20001:获取列值时出错:ORA-01403:未找到数据
我 100% 确定表和列存在(我可以从 SQLDeveloper 和 Apex SQL 命令运行此选择)。这真的是 APEX 错误还是我错过了什么?