Home » SQL & PL/SQL » SQL & PL/SQL » Date Function Returning Uncertain results
Date Function Returning Uncertain results [message #234644] Wed, 02 May 2007 14:03 Go to next message
Dhaval_Thakkar
Messages: 3
Registered: May 2007
Junior Member
Hi ,

I have a function written in PL-Sql . The function is developed on our central database server . The function uses a Sql statement to get the day of the week .

select to_char( sysdate, 'dy' ) from dual

The statement returns different results on different machines . It returns wed on my machine's PL Sql Editor and returns ´ on my friends machine PL Sql editor .

Thus we had different results when the function was triggered from different machine .

What is the potential issue here ? How can i avoid this and get consistent results .

Appreciate if i could get a prompt reply . I have my production jobs failing due to this .





Re: Date Function Returning Uncertain results [message #234649 is a reply to message #234644] Wed, 02 May 2007 14:19 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>returns ´ on my friends machine PL Sql editor .
Seems your results are lost in transformation.
And always post your exact 4 digit Oracle version, OS, proof of what you did. Someone might be in a position to help you.

[Updated on: Wed, 02 May 2007 14:22]

Report message to a moderator

Re: Date Function Returning Uncertain results [message #234650 is a reply to message #234649] Wed, 02 May 2007 14:25 Go to previous messageGo to next message
Dhaval_Thakkar
Messages: 3
Registered: May 2007
Junior Member

Hi Mahesh,

No . My concern is the sql statement
select to_char( sysdate , 'dy' ) from dual

returns two different results

1) wed :- on my machine
2) ´ :- on my friends machine .

I assume this NLS date setting . Not sure . Could you please confirm

Regards
Dhaval


Re: Date Function Returning Uncertain results [message #234652 is a reply to message #234644] Wed, 02 May 2007 14:28 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
>Could you please confirm
How can we confirm it when it only happens on your friends PC?
How about you have your friend change the NSL setting & see what happens?
Re: Date Function Returning Uncertain results [message #234654 is a reply to message #234652] Wed, 02 May 2007 14:31 Go to previous messageGo to next message
Dhaval_Thakkar
Messages: 3
Registered: May 2007
Junior Member

Hi Again,

My friend had different Date / Time setting . He had user defined date format selected . We changed Date format to windows format but still it returns same results .

Thanks
Re: Date Function Returning Uncertain results [message #234707 is a reply to message #234644] Thu, 03 May 2007 00:24 Go to previous message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
Hi,

time to consult the corresponding part of SQL documentation.
Previous Topic: XML file in Oracle
Next Topic: Dynamic Insert loop
Goto Forum:
  


Current Time: Fri Dec 09 17:27:41 CST 2016

Total time taken to generate the page: 0.16514 seconds