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: Concatenate

Re: Concatenate

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 16 Mar 2006 07:58:02 -0800
Message-ID: <1142524682.372335.250060@i40g2000cwc.googlegroups.com>

Reiro wrote:
> Hi
>
> The Start_date is of type DATE. Start_time is of type NUMBER. i had
> to put start_time as number for upload.
> Although my third column i want the data in is of type TIMESTAMP.

SQL> create table foo (d date, n number, t timestamp);

Table created

SQL> insert into foo values (sysdate, 55000, null);

1 row inserted

SQL> select * from foo;

D                    N T

----------- ----------

03/16/2006 55000

SQL> update foo set t = to_timestamp(to_char(d, 'DDMMYYYY') || ' ' || lpad(to_char(n), 6, 0), 'DDMMYYYY HH24MISS');

1 row updated

SQL> select * from foo;

D                    N T

----------- ----------

03/16/2006 55000 16-MAR-06 05.50.00.000000 AM SQL> Regards
/Rauf Received on Thu Mar 16 2006 - 09:58:02 CST

Original text of this message

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