Re: SQL update statement and TIMESTAMP

From: Pierre Tremblay <pierret_at_pierretci.com>
Date: Tue, 13 May 2003 08:42:26 -0400
Message-ID: <WF5wa.547$nT5.44396_at_news20.bellglobal.com>


Many thanks!

Issue is not to avoid extra typing. It's because the code needs to be generic as much as possible in order to work with different SQL engine. I guess I will need to integrate a datatype exception handler in the tool in order to "coach" the code on how to generate the statement.

"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message news:a20d28ee.0305122326.f77a21c_at_posting.google.com...
> "Pierre Tremblay" <pierret_at_pierretci.com> wrote in message
 news:<5KTva.898$I83.237858_at_news20.bellglobal.com>...
> > Hi
> >
> > Simple question.
> >
> > When issuing an UPDATE Table SET MyDateTimeCol = '4 Apr 98 01:00:00',
> > Oracle doesnt seem to like that and it is complaining. Does the
 statement
> > need absolutely a cast or conversion function?
>
> unless you issue
> alter session set nls_date_format appropiately yes.
> In fact, you should NEVER rely on a default date format!!
> The extra typing is apparently too much for you, but regrettably
> unavoidable if you want a stable system.
>
> Sybrand Bakker
> Senior Oracle DBA
Received on Tue May 13 2003 - 14:42:26 CEST

Original text of this message