Reputation: 19
I want to reference app_user in query (where username=(:APP_USER)) Now my query returns null values, I guess it's happening because my username col is varchar2. How to reference app_user in this situation?
Upvotes: 0
Views: 19429
Reputation: 458
you can use below:
where username=v('APP_USER')
Edit1: for performance constraints, it is always recommended that you do it like this:
where username=(select v('APP_USER') from dual)
Upvotes: 2
Reputation: 11
apex make username uppercase try (where UPPER(username)=(:APP_USER))
Upvotes: 0
Reputation: 3770
:APP_USER value depends upon the authentication model set in your application. If application is running using database authentication then the value of the user is the same as the database pseudo column USER. If the application uses an authentication scheme that requires the user to authenticate, the value of APP_USER is set by the authentication scheme, usually to the user name used during authentication.
Reference : Oracle documentation
Upvotes: 0