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

Home -> Community -> Usenet -> c.d.o.server -> Re: Loading from a column

Re: Loading from a column

From: Kevin A Lewis <Kevin_A_Lewis_at_Hotmail.com>
Date: Thu, 05 Feb 2004 11:54:51 GMT
Message-ID: <faqUb.7$mj7.0@newreader.ukcore.bt.net>


would something like

insert into table2

   select substr(data_x,1,10),to_number(substr(data_x,11,10)) from table1;

do the job.

this insert into 2 columns the first 10 characters of DATA_X into the first column and the second 10 characters into the second column after having converted the characters to number format.

bear in mind this is simplistic with only 2 columns and only one conversion to a different datatype with nothing fancy as a format for that conversion.

Regards Kevin Received on Thu Feb 05 2004 - 05:54:51 CST

Original text of this message

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