2

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.

Jestem_z_Kozanowa
  • 607
  • 3
  • 13
  • 38

2 Answers2

4

You could use :

select
     FIRST_NAME || ', ' || LAST_NAME as display_value, 
     USER_ID as return_value 
 from ALL_USERS
 order by 1
Vincent Malgrat
  • 66,725
  • 9
  • 119
  • 171
1

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)

Tom
  • 6,988
  • 1
  • 26
  • 40