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

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL Question: How to do an UPDATE to partially change a value?

Re: SQL Question: How to do an UPDATE to partially change a value?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/02/16
Message-ID: <950725769.23504.1.pluto.d4ee154e@news.demon.nl>#1/1

update <table>
set date_column =
to_date('19'||to_char(date_column,'YY-MM-HH24:MI:SS'),'YYYY-MM-HH24:MI:SS') where trunc(date_column,'CC') = 20.

Hth,

Sybrand Bakker, Oracle DBA

<robert.bowen_at_mubimedia.com> wrote in message news:88ekph$giq$1_at_nnrp1.deja.com...
> Hello all. I have a question - I have a date column with screwed up
> data. Instead of '1999' in some rows I have '2099'. My own latent Y2K
> bug. Anyway ... what's the easiest way to change these rows, just to
> get rid of the '20' and replace it with '19' ?
>
> I tried doing it using wildcards and old.date_col but I can't get it to
> work ...
>
> Anyone got a quick fix? I need a hit!
>
> Thanks.
> syg
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Feb 16 2000 - 00:00:00 CST

Original text of this message

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