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

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

ALTER SESSION SET NLS_DATE_FORMAT

From: Wendy Y <lannyue_at_yahoo.com>
Date: Thu, 15 Mar 2001 11:30:09 -0800
Message-ID: <F001.002CDDD9.20010315101025@fatcity.com>


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! Received on Thu Mar 15 2001 - 13:30:09 CST

Original text of this message

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