APEX 19.1 to 19.2 upgrade issue - Error: ORA-20001: Error fetching column value: ORA-20987: Invalid LOV type specified.
1 min read
I can't say for certain that this came up during the 19.1 to 19.2 upgrade. It is possible it showed up during an earlier upgrade but that it was just caught during regression testing from 19.1 to 19.2. In any case, you may come across the following APEX error in an Interactive Report region (and possibly other places):
ORA-20001: Error fetching column value: ORA-20987: Invalid LOV type specified.
The debug error stack might include:
Error Stack: ORA-20001: Error fetching column value: ORA-20987: Invalid LOV type specified.
Backtrace: ORA-06512: at "APEX_190200.WWV_RENDER_REPORT3", line 7623
Error: ORA-20001: Error fetching column value: ORA-20987: Invalid LOV type specified.
In short, the error is due to a SQL Query LOV that uses the same column for the display and return values, for example:
select col1, col1
This really should include column aliases (at least one) so that the sql statement doesn't have the same column resulting twice:
select col1 d, col1 r
APEX 19.2 appears to make this mandatory.
Update: This is a documented change.
To help you identify such cases, you can run the following script which outputs any possible problematic inline or shared List of Values:
Many thanks to jmjcloud for pointing this out.