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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Concatenation

Re: SQL Concatenation

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: Tue, 21 Sep 1999 14:07:18 -0400
Message-ID: <v8fnN1X2s90WJS=RNPRpRCq809WW@4ax.com>


On Tue, 21 Sep 1999 17:03:14 GMT, amerar_at_ci.chi.il.us wrote:

>
>
>Hello,
>
>The field I want to perform this operation on is of type DATE.
>
>I want to give the field a new MMDDYYYY while keeping the same hour and
>minute (HH24MI) from the date.
>

You can do this two ways.

If you know how many day +/- you can do this

update T

   set col1 = col1 <+/-> <number of days>;

or if you know the date then you can

update T

   set col1 = to_date( '<your date string in MMDDYYYY form>' ||

                       to_char( col1, 'HH24MI' ),
                       'DDMMYYYYHH24MI' );



hope this helps

chris.

>Since when you put dates into the table you need the quote the string
>and provide a format, I'm not sure how to accomplish my above task. The
> month and day and year can be quoted, but the hour and minute will come
>from the existing value in that field.......
>
>any help would be appreciated.
>
>Arthur
>amerar_at_ci.chi.il.us
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.

--
Christopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Sep 21 1999 - 13:07:18 CDT

Original text of this message

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