Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to declare a list of dates

christian41936Mar 23 2009 — edited Mar 23 2009
Hi,

I have an item which type is "Display as text based on LOV". I put in the source section under the type "Pl/SQL function body" the following pl/sql function :
DECLARE
X VARCHAR2 (4000);
Y DATE ;
BEGIN
X := 'SELECT distinct(TO_CHAR(DATE1, ''YYYY'')) d, (TO_CHAR(DATE1, ''YYYY'')) r FROM SIVOA.EVV_'|| :p4_site ||' WHERE CLEF_VAR = (SELECT CLEF_VAR FROM SIVOA.SITE_DEBIT_RIVIERE WHERE SITE ='''|| :p4_site ||''')
order by d';
EXECUTE IMMEDIATE X INTO Y;
RETURN Y ;
END;
The problem is that I get an ORA error.
ORA-00932: types de données incohérents ; attendu : - ; obtenu : -

I know that I have declared Y as a date and that what is returned by my function is a list of dates. I don't know how to declare a list of dates or whatever to be returned as a lis of values. Hope I am clear, sorry for my english.

Thank you for your kind help.

Christian
This post has been answered by Tony Andrews on Mar 23 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2009
Added on Mar 23 2009
9 comments
565 views