Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: sysdate problem from a newbie

Re: sysdate problem from a newbie

From: grAbbY0 <grAbbY0_at_hotmail.com>
Date: Sat, 18 Aug 2001 12:21:58 GMT
Message-ID: <G5tf7.465212$u5.9855407@zwoll1.home.nl>


thank you!!
very nice that a lot of you nice guys are helping us newbies out... keep the good work going :))

"Kenneth Koenraadt" <plovmand_at_hotmail.com> wrote in message news:3b7d4f89.1939875_at_news.mobilixnet.dk...
> On Fri, 17 Aug 2001 15:45:18 GMT, "grAbbY0" <grAbbY0_at_hotmail.com>
> wrote:
>
> >Hi there,
> >
> >I would appreciate some help here,
> >
> >We have a table called Alarms, every day I have to delete all the alarms
in
> >this table that were created two days before the current date. (To
prevent
> >the table from being filled up). These Alarms are generated in a SCADA
> >application which generates the time of the Alarms in a column called
ITIME.
> >The datatype is char and the value is like: 20010817164555.000
> >(YYYYMMDDHHMISS). I cant remove the '.000' because this has to be a
standard
> >value.
> >I am trying this with SYSDATE but then I get the error 'date format
picture
> >ends before converting entire input string'
> >
> >Anybody got an idea??
> >
> >Thanx in advance
>
>
> Sure,
>
> delete from Alarms where
> to_date(substr(Itime,1,length(itime)-4),'YYYYMMDDHHMISS') < sysdate-2;
>
>
> Regards,
> Kenneth Koenraadt
> Systems Consultant
> Oracle DBA
> plovmand@<no-spam>hotmail.com
Received on Sat Aug 18 2001 - 07:21:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US