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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Create Table..As Select: Number formats

Re: Create Table..As Select: Number formats

From: Tanel Poder <tanel.poder.003_at_mail.ee>
Date: Wed, 01 Oct 2003 07:09:35 -0800
Message-ID: <F001.005D1B0B.20031001070935@fatcity.com>


Hi!

> I'm trying to create a table using 'Create Table...As Select...'
>
> The contents will then be exchanged into a partitioned table, so they need
> to have the same names and datatypes.

Actually they do not have to have same column names, only the datatypes and column order has to be the same (at least in 9.2).

>
> Some of the columns in the created table are populated with zeroes & will
> be updated after the partition exchange, one of the columns is populated
> with a decode that returns a single digit number.
>
> The problem is that I need particular number formats in these columns -
> the one-digit column should be a number(1,0) and the others should be
> number(12,4). I can't specify column types in create table...as select, so
> how else can I force the columns to a particular format?

I tried to use CAST function, it didn't give an error, but column remained just normal number, so it didn't help.

I suggest you to create the table structure first and then use insert APPEND to populate the table (you can also use nologging if you like).

Tanel.

>
>
> Any ideas much appreciated.
>
> Cheers
> Simon Anderson
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author:
> INET: Simon.Anderson_at_scisys.co.uk
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Tanel Poder
  INET: tanel.poder.003_at_mail.ee

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Oct 01 2003 - 10:09:35 CDT

Original text of this message

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