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: **Updating Time part**

Re: **Updating Time part**

From: Michael Bierenfeld <michael.bierenfeld_at_ibsgmbh.de>
Date: Mon, 18 Jan 1999 17:11:45 +0000
Message-ID: <36A36B51.88CA2C56@ibsgmbh.de>


abhijitde_at_my-dejanews.com wrote:

> Hi Friends,
>
> I have a table containing two fields,
>
> adate date
> atime varchar2(8)
>
> Sample data:-
>
> adate atime
> 10-Jan-1999 12:00:00 10:30:50
> 10-Jan-1999 12:00:00 13:30:10
> 12-Jan-1999 12:00:00 09:30:00
>
> Could anyone let me the syntax for updating time part of field adate
> with atime?
>
> Thanks in advance.
>
> Abhijit
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Hi,

update atable set

   adate = to_date (to_char (adate, `DD.MM.YYYY ') || atime, 'DD.MM.YYYY HH24:MI:SS');

This reads out adate, transfers it to_char concatenats it with atime and updates adate with the result.

Regards

Michael Received on Mon Jan 18 1999 - 11:11:45 CST

Original text of this message

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