Re: Playing With Truncate and Date

From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Sun, 06 Mar 2011 15:43:32 +0100
Message-ID: <4D739D94.809_at_gmail.com>



On 06.03.2011 15:04, John Hurley wrote:
> Michel:
>
> # SQL> SELECT TRUNC( TO_DATE('27-FEB-2011') -1,'DAY')+1 FROM DUAL;
>
> ....ERROR at line 1: ORA-01858: a non-numeric character was found where
> a numeric was expected
>
> Works for me ...
>

It is just the question of time, till somebody changes nls environment (it might be yourself).

What Michel implied (i suppose) to tell
1) it is bad to rely on implicit conversion, if you can avoid it 2) it is worse, if such conversions are nls dependent, as it may introduce problems which are hard to identify 3) it is worse to promote such bad practice, as somebody, not aware of it, may take it for good practice.

Best regards

Maxim Received on Sun Mar 06 2011 - 08:43:32 CST

Original text of this message