Re: Checking value set via "set transaction" or "alter session"

From: gazzag <gareth_at_jamms.org>
Date: Mon, 10 Mar 2008 09:53:39 -0700 (PDT)
Message-ID: <b47fce11-dbff-47d5-9720-e14f5270740e@m3g2000hsc.googlegroups.com>


On 8 Mar, 19:38, Jack <jr..._at_stirlingonline.com> wrote:
> Thanks! This is definitely the solution for the NLS_DATE_FORMAT (and
> the supported other parameters set thorugh the context).
>
> Ex:
>
> -- check_sys_context.sql
> -- 03/08/08 - created
>
> DECLARE
>
> v_session_parameter   VARCHAR2(50);
>
> BEGIN
>
> v_session_parameter := SYS_CONTEXT('USERENV', 'NLS_DATE_FORMAT');
>
> DBMS_OUTPUT.PUT_LINE('The value of the parameter is: ' ||
>    v_session_parameter);
>
> END;
> /
>
> -- end of script
>
> SQL> @check_sys_context
> The value of the parameter is: YYYY-MM-DD:HH24:MI:SS
>
> PL/SQL procedure successfully completed.- Hide quoted text -
>

Or even:

DECLARE
BEGIN
DBMS_OUTPUT.PUT_LINE('The value of the parameter is: ' || SYS_CONTEXT('USERENV', 'NLS_DATE_FORMAT')); END; HTH -g Received on Mon Mar 10 2008 - 11:53:39 CDT

Original text of this message