Re: Playing With Truncate and Date

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Sun, 6 Mar 2011 16:45:51 +0100
Message-ID: <4d73ac2f$0$10735$426a34cc_at_news.free.fr>


"Maxim Demenko" <mdemenko_at_gmail.com> a écrit dans le message de news: 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

Exactly!

Regards
Michel Received on Sun Mar 06 2011 - 09:45:51 CST

Original text of this message