how do i insert the value like 232322.456 through sql loader [message #18579] |
Wed, 06 February 2002 04:58 |
ksr
Messages: 112 Registered: January 2002
|
Senior Member |
|
|
Hi,
I have a table tab1 with 2 columns
col1 number null,
col2 number null
I want to load the data through sql loader,but it is giving errors
ora-01722
sample data in sample.dat file is
-----------------
3372756.88,5673423
3330140.88,5691491
control file is
-----------------
LOAD DATA
APPEND
INTO TABLE tab1
FIELDS TERMINATED BY ","
TRAILING NULLCOLS
(
col1 "TO_NUMBER(:col1,'$99999.99')",
col2 "TO_NUMBER(:col2,'$99999.99')" )
I have tried the datatype char also,still it does not work.
It is urgent and i need to port the data...
any help is highly appreciated
|
|
|
|
|
|
|
Re: how do i insert the value like 232322.456 through sql loader [message #18600 is a reply to message #18583] |
Thu, 07 February 2002 04:36 |
Suresh Vemulapalli
Messages: 624 Registered: August 2000
|
Senior Member |
|
|
SQL> create table tab1(col1 number,col2 number);
Table created.
SQL> select * from tab1;
no rows selected
datafile:(samp.dat)
3372756.881,5673423
3330140.566,5691491
control file:
LOAD DATA
infile samp.dat
APPEND
INTO TABLE tab1
FIELDS TERMINATED BY "," optionally enclosed by '"'
TRAILING NULLCOLS
(
col1 ,
col2 )
SQL> select * from tab1;
COL1 COL2
---------- ----------
3372756.88 5673423
3330140.57 5691491
SQL> select to_char(col1,'99999999.999'),col2 from tab1;
TO_CHAR(COL1, COL2
------------- ----------
3372756.881 5673423
3330140.566 5691491
|
|
|
|