SQL loader [message #531113] |
Sun, 13 November 2011 11:09 |
Genesys
Messages: 45 Registered: August 2010
|
Member |
|
|
Hi All,
SQL> desc teable2;
Name Null? Type
----------------------------------------- -------- ----------------------------
COL1 NUMBER
and control file:snt.ctl
LOAD DATA
INFILE 'c:\snt.csv'
INTO table teable2
fields terminated by "|"
TRAILING NULLCOLS
( col1 char(8000))
and snt.csv file
10
20
30
40
but while running the below command get error in log file
HOST sqlLDR hr/hr CONTROL=snt.ctl LOG=snt.log
able TEABLE2, loaded from every logical record.
Insert option in effect for this table: INSERT
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
------------------------------ ---------- ----- ---- ---- ---------------------
COL1 FIRST 8000 | CHARACTER
value used for ROWS parameter changed from 64 to 31
Record 1: Rejected - Error on table TEABLE2, column COL1.
ORA-01722: invalid number
Record 2: Rejected - Error on table TEABLE2, column COL1.
ORA-01722: invalid number
1) can i use the below code in my ctl file, which the CSV file having the only one column?
fields terminated by "|"
2)hopefully Invalid is error occur due to the datatype mismatch between the table coulmn and ctl file column.
can you people clarify on the same please
thanks
Genesys
|
|
|
|
|
Re: SQL loader [message #531119 is a reply to message #531117] |
Sun, 13 November 2011 11:47 |
Genesys
Messages: 45 Registered: August 2010
|
Member |
|
|
Hi,
thanks for the updates,
"It is also best to use the actual data type, rather than relying on implicit conversions means in ctl file have to use
(col1 number(12))?
Please provide any existing examples or new examples for this issue.
thanks
Genesys
|
|
|
|
|
|
|
|
Re: SQL loader [message #531144 is a reply to message #531142] |
Mon, 14 November 2011 00:53 |
Genesys
Messages: 45 Registered: August 2010
|
Member |
|
|
thats great now running sucesfully with out any issue.
thanks for the help
and if possible can you explain why we can't use the excel file for the same.
|
|
|
|
Re: SQL loader [message #531164 is a reply to message #531145] |
Mon, 14 November 2011 03:52 |
cookiemonster
Messages: 13962 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
More to the point, your csv is not a csv. A proper csv can be opened with a text editor and read as plain text. What you've attached can not. It looks like you saved it as an xls and then changed the file extension manually. That doesn't work. If you save the file as a csv in the first place it should be fine.
|
|
|