Home > APEX_ITEM > TEXT_FROM_LOV
Use this function to display an item as text, deriving the display value from a list of values query.
Syntax
APEX_ITEM.TEXT_FROM_LOV_QUERY (
p_value IN VARCHAR2 DEFAULT NULL,
p_query IN
VARCHAR2,
p_null_text IN VARCHAR2 DEFAULT '%')
RETURN VARCHAR2;
Parameters
Table: TEXT_FROM_LOV_QUERY Parameters describes the parameters available in the TEXT_FROM_LOV_QUERY
function.
TEXT_FROM_LOV_QUERY Parameters
Parameter | Description |
---|---|
|
Value of a field item. |
|
SQL query that is expected to select two columns, a display column and a return column. For example: SELECT dname, deptno FROM dept |
|
Value to be displayed when the value of the field item is NULL or a corresponding entry is not located for the value |
Example
The following example demonstrates how to derive the display value from a query.
SELECT APEX_ITEM.TEXT_FROM_LOV_QUERY(empno,'SELECT ename, empno FROM emp') c from emp