Hi All
I am writing a LOV query in tabular form column. But the problem is I am unable to do a dynamic order by inside the query.
select name as d,code as r
from test_table
where category= :COLUMN1
order by (case when category= 'A' then code;
case when category= 'B' then name;
else code, length(code)
end)
The error I am getting is: ORA-00905: missing keyword
It is because of line 06. In else case I have used 2 different columns for order by. Removing this all works fine.
Is there a way I can use 2 columns for order by.
Using the following:
Oracle APEX 5.0.3
Theme: Universal Theme - 42
Database: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
I have come across another discussion:Select list in Tabular Form using PL/SQL Function Body returning SQL Query
where I found that in Apex 5, for tabular form column LOV type, pl/sql function body returning SQL query doesn't work (Is a bug I think). So I am unable to use that option for the above query also.
Any suggestions will be highly appreciated.
Thanks
Nabila
Message was edited by: Nabila Islam