Reputation: 637
I am trying to create LOV in Oracle Apex 4.1 which would contain name and surname of employees and would return only his/hers id. The syntax which does not work looks like this :
select FIRST_NAME,LAST_NAME as display_value, USER_ID as return_value from ALL_USERS order by 1
This returns error : Wrong number of columns selected in the LOV SQL query. Any help or guidance how to tackle this problem greatly appreciated.
Upvotes: 2
Views: 16655
Reputation: 7028
As an alternative to Vincent's solution, you can also look into this plugin:SkillBuilders Super LOV
It allows for multiple columns, multiple column return, and simply looks good.
The only downside is there is no tabular form option for this. (yet. It is a plugin limitation)
Upvotes: 1
Reputation: 67802
You could use :
select
FIRST_NAME || ', ' || LAST_NAME as display_value,
USER_ID as return_value
from ALL_USERS
order by 1
Upvotes: 4