Re: How to create this table?
From: Sanjay D. S. <sanjay_at_fsg.prusec.com>
Date: 1996/04/19
Message-ID: <4l80qq$ri_at_prufire4.prusec.com>#1/1
Date: 1996/04/19
Message-ID: <4l80qq$ri_at_prufire4.prusec.com>#1/1
cui_at_solaria.sol.net (David Cui) wrote:
>Hi! netters:
>
> I am trying to do this and can't.
>
>Assume I have a table A. Table has two fields B and C.
>B is a varchar2(6), and C is and thing.
>Now I like to create a new table D with two fields E and F.
>E is a varchar2(8) and F is a date, but E should equal B in fact.
>I try this
>
>create table D as
> select B,
> '01-jan-1996 00:00:00' as F
> from A;
>
>It doesn't work. First it generates Field E as a varchar2(6) instead
>of varchar2(8) and field F is a not a date.
>
>How can I do this?
How about this query:
create table d as
select rtrim(rpad(b),8)) e,
to_date('01-jan-1996 00:00:00','dd-mon-yyyy hh24:mi:ss') as f from a;
Sanjay D.S.
Oracle Consultant
Prudential Securities, Inc.
Received on Fri Apr 19 1996 - 00:00:00 CEST