APEX 5 - I have a Classic Report (based on Function) from the following statement:
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;
The choice elsif v('foo')= 'clusters'...
brings up the error:
ORA-20001: Error fetching column value: ORA-01403: no data found
I'm 100% sure that the table and the columns exist (I can run this select from SQLDeveloper and Apex SQL Commands). Is this really an APEX bug or am I missing something?
ORA-20001: Error fetching column value
- this is raised by Apex after getting the results of the query - I suspect you have a LOV-type column in the report definition that fails to find the value for one or more rows returned by that query. – Jeffrey Kemp