I have a function that returns an Array of codes (NUMBER).
select GET_USER_OFFICE_CODES(10) FROM DUAL;
returns
DB.OFFICE_CODES(3,4,5,6,7,8,9)
Ultimately I would like to create a LOV that uses this function in an APEX 5.1 application.
For example,
select office_code, id
from offices where ID IN (select GET_USER_OFFICE_CODES(10) FROM DUAL);
Obviously, I am having trouble with datatypes.
Can someone help me massage the results in SQL so that I can just do the following in SQL?
select *
from offices
where ID IN (select GET_USER_OFFICE_CODES(10) FROM DUAL);
It would have helped if you described what the function exactly does. I'm now just guessing.
Function:
What does it return?
How to use it in Apex?