Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> work around?
We have a 3rd Party application, where 1/2 of it allows on-line
querying and the other half handles scheduled queries and distributes
the results.
The application has a key word, :APPUSER, which defines who the user is who is doing the on-line queries and is decoded by the application and written out to an auditing table. However, the scheduled query program does not recognize this key word, so it gets passed directly to Oracle without decoding, resulting in 'not bound' error messages. We don't necessarily want scheduled queries to be audited, but we definitely don't want the error messages.
Can anyone recommend a way to write 1 script n PL/SQL that will work in both environments?
ie,
INSERT into Query.Query_Audit (User_Cd, User_Database_Id_Cd, Database_Name, Query_Name, Query_Start_Tstamp) Values (:APPUSER, User, 'DWH-PROD', 'DP_BLANK', SYSDATE) if the query application decodes :APPUSER, great, but if not, Oracle will know to substitute a default value and not cough up an error?
Thanks,
Carole Received on Tue Sep 24 2002 - 15:44:54 CDT