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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: ALTER SESSION SET NLS_DATE_FORMAT

Re: ALTER SESSION SET NLS_DATE_FORMAT

From: Ruth Gramolini <rgramolini_at_tax.state.vt.us>
Date: Thu, 15 Mar 2001 12:45:43 -0800
Message-ID: <F001.002CDECB.20010315104143@fatcity.com>

It will set the NLS_DATE_FORMAT for that session only.

HTH,
Ruth

>
> Hello:
>
> Can anyone explain to me what exactly 'Alter Session' will do?
> Will it alter the session all the way until it close?
> How do I find out what kind of mode is my SQLPLUS session currently on?
>
> I have following script like:
>
> ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD-HH24.MI.SS';
> SELECT ...
> FROM ...
> WHERE ...
> (TO_DATE(SUBSTR(KOMP.DATCRE,1,19),'YYYY-MM-DD-HH24.MI.SS') <

TO_DATE(SUBSTR(KOMP.DATCHG,1,19),'YYYY-MM-DD-HH24.MI.SS')) and

> (TO_DATE(TO_CHAR(SYSDATE-1),'YYYY-MM-DD-HH24.MI.SS') <
TO_DATE(SUBSTR(KOMP.DATCHG,1,19),'YYYY-MM-DD-HH24.MI.SS'));

>
> When I run the script as above, it will only return 2 records, which is
correct.
>
> However, when I remove "ALTER SESSION SET NLS_DATE_FORMAT =
'YYYY-MM-DD-HH24.MI.SS';"
> the query will return 8000 records which is wrong.
>
> What function does 'ALTER SESSION' have here?
>
> Thanks
>
>
>
>
>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices!
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ruth Gramolini
  INET: rgramolini_at_tax.state.vt.us

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Mar 15 2001 - 14:45:43 CST

Original text of this message

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