It will set the NLS_DATE_FORMAT for that session only.

HTH,
Ruth

----- Original Message -----
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Thursday, March 15, 2001 1:10 PM


>
> 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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to