From oracle-l-bounce@freelists.org Wed Apr 27 11:37:15 2005 Return-Path: Received: from air891.startdedicated.com (root@localhost) by orafaq.com (8.12.10/8.12.10) with ESMTP id j3RGbFC1025998 for ; Wed, 27 Apr 2005 11:37:15 -0500 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air891.startdedicated.com (8.12.10/8.12.10) with ESMTP id j3RGb94Z025980 for ; Wed, 27 Apr 2005 11:37:14 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 136E7186850; Wed, 27 Apr 2005 10:32:03 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12169-07; Wed, 27 Apr 2005 10:32:03 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 907F6186CCE; Wed, 27 Apr 2005 10:32:02 -0500 (EST) Message-ID: From: "NGUYEN Philippe (Cetelem)" To: oracle-l Subject: RE: about CTAS and column definition Date: Wed, 27 Apr 2005 17:31:03 +0200 MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-archive-position: 19083 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: philippe.nguyen@cetelem.fr Precedence: normal Reply-To: philippe.nguyen@cetelem.fr X-list: oracle-l X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on air891.startdedicated.com X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=ham version=2.63 thanks Tom so it is not possible to do this in one shut ? > ____________________________________________________ > Philippe Nguyen > CETELEM - Administration, Architecture Décisionnelle > Direction Customer Relationship Management > E-Mail : philippe.nguyen@cetelem.fr > Tel : (+33) 1 46 39 92 16 - Fax : (+33) 1 46 39 59 88 > -----Message d'origine----- De : Mercadante, Thomas F (LABOR) [mailto:thomas.mercadante@labor.state.ny.us] Envoyé : mercredi 27 avril 2005 17:27 À : 'philippe.nguyen@cetelem.fr'; oracle-l Objet : RE: about CTAS and column definition Philippe, You can do it this way: create table B as select sum(ctas.numcli) as numcli from A where rownum < 1; alter table b modify(numcli number(3)); insert into b as select sum(ctas.numcli) from a; Tom -----Original Message----- From: NGUYEN Philippe (Cetelem) [mailto:philippe.nguyen@cetelem.fr] Sent: Wednesday, April 27, 2005 11:09 AM To: oracle-l Subject: about CTAS and column definition Hi list, just a little problem : SQL> desc A Name Type Nullable Default Comments ------ --------- -------- ------- -------- NUMCLI NUMBER(3) Y SQL> create table B as select sum(ctas.numcli) as numcli from A; Table created SQL> desc ctas3 Name Type Nullable Default Comments ------ ------ -------- ------- -------- NUMCLI NUMBER Y In table B, how can I make column numcli have number(3) type not just number column definition using "Create Table As Select" method ? Is it possible ? TIA Philippe -- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-l