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: Question about datatypes

Re: Question about datatypes

From: Jared Still <jkstill_at_cybcon.com>
Date: Mon, 03 Nov 2003 07:54:25 -0800
Message-ID: <F001.005D5746.20031103075425@fatcity.com>


If the data is really a number ( ie. no alpha characters ) you don't need to do anything, Oracle does an implicit conversion.

insert into my_table_numeric( real_number_column ) select my_stupid_varchar2_col
from I_hope_these_are_all_numeric_table
/

Jared

On Mon, 2003-11-03 at 04:44, roland.skoldblom_at_ica.se wrote:
>
> Yes but how should I write the sql statement when to make the incoming varchar2 field into a number?
>
> Roland
>
>
>
> Mladen Gogala
> <mgogala_at_adelphia To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> .net> cc:
> Sent by: Subject: Re: Question about datatypes
> ml-errors_at_fatcity
> .com
>
>
> 2003-11-03 13:19
> Please respond to
> ORACLE-L
>
>
>
>
>
>
> Trigger using TO_NUMBER function would be the first thing that comes to mind.
> I have designs like that, which are used for parsing so calld "Bloomberg
> files". Those files contain strings like "N.A.", "-",|| ('|' is the field
> delimiter) and all of those strings mean "NULL". Also, stock split ratio can
> be described as: "1:2", "1/2", "2 for 1", "0.5", which has to be mapped to a
> number field. I'm using perl to parse the input files and I'm using crontab to
> schedule perl script exectuion.
>
> On 2003.11.03 05:14, roland.skoldblom_at_ica.se wrote:
> > Hallo,
> >
> > Maybe this sounds simple for all of you, but I have a table with the field
> > PRICE and that is with datatype varchar2 I want the data in that field to be
> > inserted in another table with field PRICE, but that field has the datatype
> > NUMBER. How can I
> > deasiest do this sql statement?
> >
> > I really have to have the Varchar dataype in table1.
> >
> > Thanks in advance
> >
> > Roland
> >
> >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > --
> > Author:
> > INET: roland.skoldblom_at_ica.se
> >
> > 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).
> >
>
> --
> Mladen Gogala
> Oracle DBA
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Mladen Gogala
> INET: mgogala_at_adelphia.net
>
> 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:
> INET: roland.skoldblom_at_ica.se
>
> 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: Jared Still
  INET: jkstill_at_cybcon.com

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 Mon Nov 03 2003 - 09:54:25 CST

Original text of this message

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