Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> sys_context does not work in function.
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
![]() |
![]() |