sysdate
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: sysdate

  1. #1
    Join Date
    Nov 2000
    Location
    Birmingham, UK
    Posts
    360
    When running the following:

    select to_char(sysdate,'D') from dual;

    through a Windows SQL session on PC is giving an answer of 4 and one an answer of 5.
    Are there any client config files that set NLS parameters?

    Thanx in advance

    P.S we are running 8.1.7 and using hostnaming

  2. #2
    Join Date
    Nov 2000
    Location
    Birmingham, UK
    Posts
    360
    To make life even more confusing I'm getting different results with different versions of SQL Plus on the same PC! When running a 8.1.7 sSQL Plus I get 4 and when running a 8.0.6 from a different ORACLE_HOME I get 5. THe server version is 8.1.6.3.
    I was thinking it could be an NLS problem i.e. some regions start the week on a Sunday and others on a Monday but I'm not aware of any NLS parameters in the sqlnet.ora file.
    Any help would be much appreciated!

  3. #3
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Check on both the servers :

    select name, value from v$parameter where name like 'n%';

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  4. #4
    Join Date
    Nov 2000
    Location
    Birmingham, UK
    Posts
    360
    Think I've solved it. It appears that the default setting for NLS_TERRITORY is America in the registry where as we have it set to UNITED KINGDOM on the server.

  5. #5
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    True. In some parts of our world people have a habit to start counting the days of the week begining on Sundays, while on other parts week starts om Monday.... So it is NLS_TERRITORY dependant, not computer dependant. On the same computer you can have two oracle homes with different NLS settings, hence you can get different results from the same query if the tools used are from different oracle_homes.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width