Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> sys_context does not work in function.

sys_context does not work in function.

From: DaLoverhino <DaLoveRhino_at_hotmail.com>
Date: 2 Dec 2005 19:45:07 -0800
Message-ID: <1133581507.098559.167960@g14g2000cwa.googlegroups.com>


Hello, I can do this at the sqlplus prompt:

select sys_context( 'USERENV', 'CLIENT_IDENTIFIER') from dual;

Yet when I have the following in a function:

f_clientid := sys_context( 'USERENV', 'CLIENT_IDENTIFIER');

Oracle complains when I try to load the function:

LINE/COL ERROR



9/3	 PL/SQL: SQL Statement ignored
9/86	 PL/SQL: ORA-00904: "CLIENT_IDENTIFIER": invalid identifier


I don't know what's going on, but how do I fix it?

The function will be used as a VPD policy function and f_clientid can be null, which the function will be able to handle.

Any thoughts or references would be great. Thanks. Received on Fri Dec 02 2005 - 21:45:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US