SQL Loader failed
Hi all
I am load flat file in custom intermediate table using sql loader, but I'm betting that the error
Record 2720: Rejected - error on the table XXPLL_SALES_FCST_BGA_TMPL, column MKTG_ASP.
ORA-01722: invalid number
XXPLL_SALES_FCST_BGA_TMPL - Custom intermediate Table
MKTG_ASP - contains decimal values
I created this column as a number data type.
I've seen much after and it was proposed to use 'Decimal external' but it still does not work. All suggestions will be useful.
Thank you
Sharath Chander M
Hi Barbara Boehmer
Now, I changed in the file ctl under 'EXTERNAL DECIMAL Mktg_ASP DONE BY a SPACE' and now all data are allowed in / load. Is - this way?
I will also try as you say. Also if the data file has a line any, as a null value for this column will be it's causing any problem for the amendment that I have performed in ctl file?
Thank you
Sharath Chander M
Tags: Database
Similar Questions
-
SQL Loader failed to load the same source sometimes data file
I meet different types of data, loading errors when you try to load data. What makes it really annoying, is that I'm not able to identify the real culprit since the success of load depends on the amount of lines in the source data file but not its content. I use dataset Toad export feature to create delimited data set. When I decided to take the first 50 lines then succeeds data to load into the target table. When I decide to take the first 150 lines then the data to load into the target table fails indicating that:
I can see .bad file that the same line has been loaded successfully when the data file that contains 50 rows was used. The content has no column for this particular row is NULL (no chain).Record 13: Rejected - Error on table ISIKUD, column SYNLAPSI. ORA-01722: invalid number
I suspect that the toad generates faulty delimited text file when taking 150 lines. File data for reasons of confidentiality, I can't show. What can I do? How can we all further investigate this problem? Size of the array that must be loaded by SQL Loader is almost 600 MB. I use Windows XP.
Published by: totalnewby on June 30, 2012 10:17I do not believe that customer sqlloader 11g allows you to load a 10g database. You can run sqlldr on the server of database 10g itself? PL also post the rest I asked information
HTH
Srini -
SQL Loader fails to process the string columns longer than 255 characters
Hi all
I use the LKM sqlldr (oracle) file to load data from flat file to oracle. I am aware that if you do not specify the length of the input of character data, sqlldr defaults to 255 characters. But, in my store of data source, I've specified the length of the column to be 1000, but sqlldr does not always treat records with more than 255 characters.
No idea how to change this behavior in sqlldr?
Receive your answer.
HeyYou can change the step "to generate a CTL file."
and replace the section:
} else { // The source column is a STRING => no options to add format = ""; };
with
} else { // The source column is a STRING => add char(length) for length greater than 255 taille = new Integer(colPrecision).intValue(); if (taille > 254) format = "CHAR("+colPrecision+")"; else format =""; };
-
SQL Loader - ignore the lines with "rejected - all null columns."
Hello
Please see the attached log file. Also joined the table creation script, data file and the bad and throw the files after execution.
Sqlldr customer in the version of Windows-
SQL * Loader: release 11.2.0.1.0 - Production
The CTL file has two clauses INTO TABLE due to the nature of the data. The data presented are a subset of data in the real world file. We are only interested in the lines with the word "Index" in the first column.
The problem we need to do face is, according to paragraph INTO TABLE appears first in the corresponding CTL lines file to the WHEN CLAUSE it would insert and the rest get discarded.
1. statement of Create table : create table dummy_load (varchar2 (30) name, number, date of effdate);
2. data file to simulate this issue contains the lines below 10. Save this as name.dat. The intention is to load all of the rows in a CTL file. The actual file would have additional lines before and after these lines that can be discarded.
H15T1Y Index | 2. 19/01/2016 |
H15T2Y Index | 2. 19/01/2016 |
H15T3Y Index | 2. 19/01/2016 |
H15T5Y Index | 2. 19/01/2016 |
H15T7Y Index | 2. 19/01/2016 |
H15T10Y Index | 2. 19/01/2016 |
CPDR9AAC Index | 2. 15/01/2016 |
MOODCAVG Index | 2. 15/01/2016 |
H15TXXX Index | 2. 15/01/2016 |
H15TXXX Index | 2. 15/01/2016 |
3. the CTL file - name.ctl
DOWNLOAD THE DATA
ADD
IN THE TABLE dummy_load
WHEN (09:13) = "Index".
TRAILING NULLCOLS
(
COMPLETED name BY ' | ',.
rate TERMINATED BY ' | '.
COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").
)
IN THE TABLE dummy_load
WHEN (08:12) = "Index".
TRAILING NULLCOLS
(
COMPLETED name BY ' | ',.
rate TERMINATED BY ' | '.
COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").
)
invoke SQL loader in a file-> beats
C:\Oracle\product\11.2.0\client\bin\sqlldr USERID = myid/[email protected] CONTROL=C:\temp\t\name.ctl BAD=C:\temp\t\name_bad.dat LOG=C:\temp\t\name_log.dat DISCARD=C:\temp\t\name_disc.dat DATA=C:\temp\t\name.dat
Once this is run, the following text appears in the log file (excerpt):
Table DUMMY_LOAD, charged when 09:13 = 0X496e646578 ('Index' character)
Insert the option in effect for this table: APPEND
TRAILING NULLCOLS option in effect
Column Position Len term Encl. Datatype name
------------------------------ ---------- ----- ---- ---- ---------------------
NAME FIRST * | CHARACTER
RATE NEXT * | CHARACTER
EFFDATE NEXT * | CHARACTER
SQL string for the column: ' TO_DATE (: effdate, "MM/DD/YYYY").
Table DUMMY_LOAD, charged when 08:12 = 0X496e646578 ('Index' character)
Insert the option in effect for this table: APPEND
TRAILING NULLCOLS option in effect
Column Position Len term Encl. Datatype name
------------------------------ ---------- ----- ---- ---- ---------------------
NAME NEXT * | CHARACTER
RATE NEXT * | CHARACTER
EFFDATE NEXT * | CHARACTER
SQL string for the column: ' TO_DATE (: effdate, "MM/DD/YYYY").
Record 1: Ignored - all null columns.
Sheet 2: Cast - all null columns.
Record 3: Ignored - all null columns.
Record 4: Ignored - all null columns.
Sheet 5: Cast - all null columns.
Sheet 7: Discarded - failed all WHEN clauses.
Sheet 8: Discarded - failed all WHEN clauses.
File 9: Discarded - failed all WHEN clauses.
Case 10: Discarded - failed all WHEN clauses.
Table DUMMY_LOAD:
1 row loaded successfully.
0 rows not loaded due to data errors.
9 lines not loading because all WHEN clauses were failed.
0 rows not populated because all fields are null.
Table DUMMY_LOAD:
0 rows successfully loaded.
0 rows not loaded due to data errors.
5 rows not loading because all WHEN clauses were failed.
5 rows not populated because all fields are null.
The bad file is empty. The discard file has the following
H15T1Y Index | 2. 19/01/2016 |
H15T2Y Index | 2. 19/01/2016 |
H15T3Y Index | 2. 19/01/2016 |
H15T5Y Index | 2. 19/01/2016 |
H15T7Y Index | 2. 19/01/2016 |
CPDR9AAC Index | 2. 15/01/2016 |
MOODCAVG Index | 2. 15/01/2016 |
H15TXXX Index | 2. 15/01/2016 |
H15TXXX Index | 2. 15/01/2016 |
Based on the understanding of the instructions in the CTL file, ideally the first 6 rows will have been inserted into the table. Instead the table comes from the line 6' th.
NAME RATE EFFDATE H15T10Y Index 2 January 19, 2016 If the INTO TABLE clauses were put in the CTL file, then the first 5 rows are inserted and the rest are in the discard file. The line 6' th would have a ""rejected - all columns null. "in the log file. "
Could someone please take a look and advise? My apologies that the files cannot be attached.
Unless you tell it otherwise, SQL * Loader assumes that each later in the table and what clause after the first back in the position where the previous left off. If you want to start at the beginning of the line every time, then you need to reset the position using position (1) with the first column, as shown below. Position on the first using is optional.
DOWNLOAD THE DATA
ADD
IN THE TABLE dummy_load
WHEN (09:13) = "Index".
TRAILING NULLCOLS
(
name POSITION (1) TERMINATED BY ' | '.
rate TERMINATED BY ' | '.
COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").
)
IN THE TABLE dummy_load
WHEN (08:12) = "Index".
TRAILING NULLCOLS
(
name POSITION (1) TERMINATED BY ' | '.
rate TERMINATED BY ' | '.
COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").
)
-
the formatting of char to number in sql loader control file
I tried to load a huge csv Excel file into oracle with sql loader database. But a column contains numbers of year as '2014', ' 2015 ". In the control file, I have defined as:
column_name decimal (38) external "TO_NUMBER (: column_name, ' 9999').
It awlays say: ORA-01722 invalid number format. I changed the format of different number. All this has not worked. Please help me on this.
1. the data of table column type is number (38.0)
2. data csv file looks like this: color is the number of year.
04/03/15, D_2-15, 10953562, 11116, 27144, 03/03/15,2015
04/03/15, P_1-58, 1143088, 5262, 12994, 03/03/15,2015
04/03/15, Q_1-31_Distinct_WWE, 7576633, 22352, 52975, 03/03/15,2015
Thanks in advance.
We can not help you unless you provide a sample of documents failed. The sample you provided loads without any problems:
SQL > CREATE TABLE MY_TABLE)
2 COLONNE_1 DATE,
3 COLUMN_2 VARCHAR2 (255 BYTE).
COLUMN_3 VARCHAR2 (255 BYTE) 4.
COLUMN_4 VARCHAR2 (255 BYTE) 5.
6 COLUMN_5 VARCHAR2 (255 BYTE).
7 COLONNE_6 DATE,
8 BUSINESS_YR NUMBER(*,0)
9 )
10.Table created.
SQL > home
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.C:\app\xxx\product\11.2.0\dbhome_2\BIN>type c:\temp\xx.ctl
DOWNLOAD THE DATA
CHARACTERSET US7ASCIIINFILE *.
TRUNCATE
IN THE TABLE MY_TABLE
FIELDS ENDED BY ',' POSSIBLY FRAMED BY "" "
TRAILING NULLCOLS
(
COLONNE_1 DATE "MM-DD-AA.
COLUMN_2 CHAR (255),
COLUMN_3 CHAR (255),
COLUMN_4 CHAR (255) NULLIF COLUMN_4 = BLANKS,
COLUMN_5 CHAR (255) NULLIF COLUMN_5 = BLANKS,
COLONNE_6 DATE "MM-DD-YY."
BUSINESS_YR EXTERNAL INTEGER (38)
)
BEGINDATA
03/20/15,1P-11,1111.22,,,03/22/15, 2014
21/03/15, M_XXX-4, 5607817, 0, 0, 03-9/22/15, 2014
22/03/15, M_DDD-2, 54990, 0, 0, 03-8/22/15, 2014
23/03/15, R_1-46, 5297481, 24, 24, 03/22/15, 2014
16/03/15, X_1 - 48 a, 8547274, 13474, 13474, 15/03/15, 2015
03/17/15,1T-15-dental,2118.12,,,03/15/15, 2015
18/03/15, 1 S - 1S, 555, 15/03/15, 2015
19/03/15, P_NNN-7, 7455342, 10941, 10941, 03/15/15, 2015
C:\app\xxx\product\11.2.0\dbhome_2\BIN>sqlldr control=c:\temp\xx.ctl log=c:\temp\xx.log
Username:Scott
Password:SQL * Loader: release 11.2.0.3.0 - Production on Sun Apr 5 06:28:06 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Commit the point reached - the number of logical records 7
Commit the point reached - the number of logical records 8C:\app\xxx\product\11.2.0\dbhome_2\BIN>exit
SQL > column column_2 format a15
SQL > column column_3 format a10
SQL > column column_4 format a8
SQL > column column_5 format a8
SQL > select * from my_table
2.COLUMN_1, COLUMN_2, COLUMN_3, COLUMN_4 COLUMN_5 COLONNE_6 BUSINESS_YR
--------- --------------- ---------- -------- -------- --------- -----------
MARCH 20, 15 1 P - 11 1111.22 2014 22 MARCH 15
21 MARCH 15 M_XXX-9-4 5607817 0 0 22 MARCH 15 2014
22 MARCH 15 M_DDD-8-2 54990 0 0 22 MARCH 15 2014
23 MARCH 15 R_1-46 5297481 24 24 22 MARCH 15 2014
16 March 15 X_1-48 has 8547274 13474 13474 15 March 15 2015
March 17, 15 1 t 15-dental 2118.12 15 March 15 2015
1 S - 1 S 18 MARCH 15 555 2015 15 MARCH 15
MARCH 19, 15 P_NNN-7 7455342 10941 10941 15 MARCH 15 2015SY.
-
The execution of work load failed
Hi experts BI Apps,
I made a plan to load on the supply of the Oracle and analytics spend, load failed at the SDE_ORAR1212_ADAPTOR_SDE_ORA_UOMCONVERSIONGENERAL_INTERCLASS session
ODI-1519: series step "start load Plan.
(InternalID:2278500) ' failed, because the child step "Global Variable Refresh.
(InternalID:2279500) "is a mistake.
ODI-1519: series step "Refresh Global Variable (InternalID:2279500).
has failed, because the step child ' Source extracted phase (InternalID:2282500) ' is
by mistake.
ODI-1519: step series ' Source extracted phase (InternalID:2282500) ' failed
because the child step "1 general (InternalID:2283500)" is in error.
ODI-1519: series step '1 general (InternalID:2283500)' failed, because
step child "2 General SDE (InternalID:2326500)" is in error.
ODI-1519: series step '2 General SDE (InternalID:2326500)' failed
because no children "Parallel (InternalID:2412500)" is in error.
ODI-1518: parallel step 'Parallel (InternalID:2412500)' failed. 1 child
steps in error, which is more than the maximum number of permits
errors (0) defined for parallel step. Has no measures of the child: 3 SDE
General MEASURE unit (InternalID:2432500)
ODI-1519: series step '3 General SDE UOM (InternalID:2432500)' failed
because the step of the 'Load Target Table (InternalID:2435500)' child is in error.
ODI-1519: series step 'Load Table of target (InternalID:2435500)' failed
because the step 'EBS_12_1_2 - 3 (InternalID:2436500) DSN' child is in
error.
ODI-1519: series step 'EBS_12_1_2 - DSN 3 (InternalID:2436500)' failed
because the stage of the child "UOM_DIM (InternalID:2437500)" is in error.
ODI-1519: series step 'UOM_DIM (InternalID:2437500)' failed, because
stage of the child 'SDE_ORA_UOMCONVERSIONGENERAL_INTERCLASS '.
(InternalID:2438500) "is a mistake.
ODI-1217: Session
SDE_ORAR1212_ADAPTOR_SDE_ORA_UOMCONVERSIONGENERAL_INTERCLASS (667500)
fails with return code 1031.
ODI-1226: step run
SDE_ORA_UOMConversionGeneral_InterClass.W_UOM_CONVERSION_GS falls down after 1
attempt (s).
ODI-1240: Flow Run
SDE_ORA_UOMConversionGeneral_InterClass.W_UOM_CONVERSION_GS fails while
running a load operation. This flow of charge table target
W_UOM_CONVERSION_GS.
ODI-1227: SrcSet0 (load) task fails on the source of ORACLE connection
ON_EBS1212.
Caused by: java.sql.SQLSyntaxErrorException: ORA-01031: insufficient
privileges
I will be grateful someone can give some clues about this.
Thank you.
you don't have enough privileges for the user you are using to run the load. Check with the team of DB if the user you are using has obtained the privileges of right or not
-
Date fromats loading using SQL * Loader
Hello
I have the data to load into an Oracle DB using sqlldr below
333. 789. 6 ||| 01-08-2013 | 2014-08-01 |
334. 789. 6 ||| 01-08-2013 | 2014-08-01 |
335. 789. 6 ||| 01-08-2013 | 2014-08-01 |
It fails while the failed to load on date formats. How can I fix everything by using load data.
Thank you
Sylvie
Works for me. You must validate the CTL file.
Here is an example:
Control line: -.
DOWNLOAD THE DATA
INFILE *.
IN THE TABLE test_table
REPLACE
FIELDS TERMINATED BY ', '.
(
Col DATE 'yyyy-mm-dd ".
)
BEGINDATA
2013-08-01
2014-09-01
2015-10-01
2016-11-01
2017-12-01
-Create table
SQL > create table test_table (date of the pass);
Table created.
-SQL * Loader
C:\Users\43729434>sqlldr user/password@db_alias name control=C:\fakepath\test_ctl.ctl
SQL * Loader: release 11.2.0.1.0 - Production Tue Oct 24 10:26:40 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit the point reached - the number of logical records 4
Commit the point reached - the number of logical records 5-Check the data in the database
SQL > alter session set nls_date_format = 'DD-Mon-YYYY ';
Modified session.
SQL > select col from test_table;
COL
-----------
August 1, 2013
01-sep-2014
October 1, 2015
November 1, 2016
December 1, 2017SQL >
-
Error loading XML file in the column of XMLTYPE through SQL loader
Hi gurus,
I am trying to load the XML file into the column of XMLTYPE through SQL Loader but the errors themselves. Here are the details
Databases
The table structureSQL*Plus: Release 10.2.0.3.0 - Production on Tue Jul 24 17:17:55 2012 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Release 10.2.0.3.0 - 64bit Production BANNER ---------------------------------------------------------------- Oracle Database 10g Release 10.2.0.3.0 - 64bit Production PL/SQL Release 10.2.0.3.0 - Production CORE 10.2.0.3.0 Production TNS for Linux: Version 10.2.0.3.0 - Production NLSRTL Version 10.2.0.3.0 - Production
XML (simple.xml) fileCREATE TABLE TH_XML ( COL_ID_1 VARCHAR2(100 BYTE), IN_FILE_1 XMLTYPE ) XMLTYPE IN_FILE_1 STORE AS CLOB (TABLESPACE SMDAT)
Control file<?xml version="1.0"?> <catalog> <book id="bk101"> <author>Some Author1</author> <title>Some Title1</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>creating applications</description> </book> <book id="bk112"> <author>Some Author2</author> <title>Some Title2</title> <genre>Computer</genre> <price>49.95</price> <publish_date>2001-04-16</publish_date> <description>Microsoft Visual Studio 7 is explored in depth</description> </book> </catalog>
LOG fileLOAD DATA INFILE 'c:\simple.xml' APPEND INTO TABLE TH_XML XMLTYPE(in_file_1) ( col_id_1 filler CHAR (100), in_file_1 LOBFILE(CONSTANT "c:\simple.xml") TERMINATED BY EOF )
I get error ORA-00904: "SYS_NC_ROWINFO$": invalid identifier in the logfile (mentioned above). Could someone help me know where I am doing wrong?SQL*Loader: Release 10.2.0.3.0 - Production on Tue Jul 24 16:42:25 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved. Control File: c:\my_file.ctl Data File: c:\simple.xml Bad File: c:\simple.bad Discard File: none specified (Allow all discards) Number to load: ALL Number to skip: 0 Errors allowed: 50 Bind array: 64 rows, maximum of 256000 bytes Continuation: none specified Path used: Conventional Table TH_XML, loaded from every logical record. Insert option in effect for this table: APPEND Column Name Position Len Term Encl Datatype ------------------------------ ---------- ----- ---- ---- --------------------- COL_ID_1 FIRST 100 CHARACTER (FILLER FIELD) IN_FILE_1 DERIVED * EOF CHARACTER Static LOBFILE. Filename is c:\simple.xml Record 1: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 2: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 3: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 4: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 5: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 6: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 7: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 8: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 9: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 10: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 11: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 12: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 13: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 14: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 15: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 16: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 17: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 18: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 19: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 20: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 21: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 22: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 23: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Table TH_XML: 0 Rows successfully loaded. 23 Rows not loaded due to data errors. 0 Rows not loaded because all WHEN clauses were failed. 0 Rows not loaded because all fields were null. Space allocated for bind array: 256 bytes(64 rows) Read buffer bytes: 1048576 Total logical records skipped: 0 Total logical records read: 23 Total logical records rejected: 23 Total logical records discarded: 0 Run began on Tue Jul 24 16:42:25 2012 Run ended on Tue Jul 24 16:42:26 2012 Elapsed time was: 00:00:00.23 CPU time was: 00:00:00.05
Thanks in advance.
Published by: 876991 on 24 July 2012 14:18Hello
This remove the control file:
XMLTYPE(in_file_1)
It is used only if the target table is an array of XMLType object.
For an XMLType column LOBFILE is sufficient, for example:
LOAD DATA INFILE * APPEND INTO TABLE TH_XML ( col_id_1 CHAR (100), in_file_1 LOBFILE(CONSTANT "c:\simple.xml") TERMINATED BY EOF ) begindata MYID1
It tells SQL * Loader data consisting of one record with COL_ID_1 = "MYID1" and content = "c:\simple.xml" IN_FILE_1
SQL> CREATE TABLE TH_XML 2 ( 3 COL_ID_1 VARCHAR2(100 BYTE), 4 IN_FILE_1 XMLTYPE 5 ); Table created. SQL> host sqlldr control=test.ctl Username:dev Password: SQL*Loader: Release 11.2.0.2.0 - Production on Mer. Juil. 25 01:30:46 2012 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. Commit point reached - logical record count 1 SQL> set long 5000 SQL> column col_id_1 format a15 SQL> select * from th_xml; COL_ID_1 IN_FILE_1 --------------- -------------------------------------------------------------------------------- MYID1
Some Author1 Some Title1 Computer 44.95 2000-10-01 creating applications Some Author2 Some Title2 Computer 49.95 2001-04-16 Microsoft Visual Studio 7 is explored in depth -
SQL * Loader - rejected records - error on table ORA-01722: invalid number
Get the following errors:
Please tell me where I'm wrong?
The log file and extracts the data file with the control file is attached.
Also guide me please how I can download 4900 files at once?
-------------------------------------
SQL * Loader: release 11.1.0.7.0 - Production on Fri 14 Oct 03:06:06 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Control file: sample.ctl
Data file: Cities.csv
Bad leadership: Cities.bad
Discard File: none is specified
(Allow all releases)
Number of loading: ALL
Number of jump: 0
Authorized errors: 50
Link table: 64 lines, maximum of 256000 bytes
Continuation of the debate: none is specified
Path used: classics
Table CITY, loaded from every logical record.
Insert the option in effect for this table: INSERT
Column Position Len term Encl. Datatype name
------------------------------ ---------- ----- ---- ---- ---------------------
FIRST ID *, CHARACTER
35. ACCORDING TO NAME, ' CHARACTER
COUNTRYCODE 3, ' CHARACTER
THE NEXT POPULATION * CHARACTER WHT
Sheet 1: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 2: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 3: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Folder 4: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 5: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 6: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 7: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 8: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
File 9: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Case 10: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Factsheet 11: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 12: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
File 13: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Fact sheet 14: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Fact sheet 15: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 16: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
File 17: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 18: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
File 19: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 20: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 21: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Account 22: rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 23: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record number of 24: rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 25: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Fact sheet 26: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Fact sheet 27: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 28: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 29: rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 30: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record of 31: rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
• Statement 32: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 33: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Page 34: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 35: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 36: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 37: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 38: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 39: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 40: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 41: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Page 42: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 43: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 44: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 45: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
• Statement 46: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 47: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 48: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 49: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Page 50: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 51: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
NUMBER of MAXIMUM ERRORS EXCEEDED - above the statistics reflect partial performance.
CITY table:
0 rows successfully loaded.
51 lines not filled due to data errors.
0 rows not loading because all WHEN clauses were failed.
0 rows not populated because all fields are null.
The space allocated to bind table: 35840 bytes (64 lines)
Bytes of read buffer: 1048576
Total logical records ignored: 0
Total logical records read: 64
Total rejected logical records: 51
Total logical records ignored: 0
Run started on Fri 14 Oct 03:06:06 2011
Run finished Fri Oct 14 03:06:12 2011
Time was: 00:00:06.18
Time processor was: 00:00:00.03
----------------------------------------------------------------------
my control file (sample.ctl):
Load data infile 'Cities.csv '.
in the town of table
fields completed by «,»
(external id integer,
char (35) name box by ' ', '
CountryCode tank (3) box by ' ', '
external population integer terminated by '\n '.
)
my data (Cities.csv) file (it contains 4900 documents, but I show here just 4 records for ease)
3830, "Virginia Beach", "USA", 425257
3831, 'Atlanta', 'USA', 416474
3832, "Sacramento", "USA", 407018
3833, 'Oakland', 'USA', 399484
Thanks in advance!Watch when I have a little change your database as follows
1,'Kabul','AFG',1780000 2,'Qandahar','AFG','237500' 3,'Herat','AFG','186800'
I got the same error (last 2 rows rejected for the same number invalid error)
mhouri > select * from cities; ID NAME COU POPULATION ---------- ----------------------------------- --- ---------- 1 Kabul AFG 1780000 SQL*Loader: Release 10.2.0.3.0 - Production on Fri Oct 14 10:38:06 2011 Copyright (c) 1982, 2005, Oracle. All rights reserved. Control File: cities.ctl Data File: cities.dat Bad File: cities.bad Discard File: none specified (Allow all discards) Number to load: ALL Number to skip: 0 Errors allowed: 50 Bind array: 64 rows, maximum of 256000 bytes Continuation: none specified Path used: Conventional Table CITIES, loaded from every logical record. Insert option in effect for this table: INSERT Column Name Position Len Term Encl Datatype ------------------------------ ---------- ----- ---- ---- --------------------- ID FIRST * , CHARACTER NAME NEXT 35 , ' CHARACTER COUNTRYCODE NEXT 3 , ' CHARACTER POPULATION NEXT * WHT CHARACTER Record 4: Rejected - Error on table CITIES, column ID. Column not found before end of logical record (use TRAILING NULLCOLS) Record 2: Rejected - Error on table CITIES, column POPULATION. ORA-01722: invalid number Record 3: Rejected - Error on table CITIES, column POPULATION. ORA-01722: invalid number Table CITIES: 1 Row successfully loaded. 3 Rows not loaded due to data errors. 0 Rows not loaded because all WHEN clauses were failed. 0 Rows not loaded because all fields were null. Space allocated for bind array: 35840 bytes(64 rows) Read buffer bytes: 1048576 Total logical records skipped: 0 Total logical records read: 4 Total logical records rejected: 3 Total logical records discarded: 0 Run began on Fri Oct 14 10:38:06 2011 Run ended on Fri Oct 14 10:38:06 2011 Elapsed time was: 00:00:00.23 CPU time was: 00:00:00.09
Value of the population within the data file must be a number
Best regards
Mohamed Houri
-
How to handle multiple formats of date to the same date field in SQL * Loader
Dear all,
I have a requirement where I need to get data from a text file and even insert into the oracle table.
I'm using SQL * Loader to fill data from the text file in my table.
The file has an area where I expect to date data date in different formats, such as MON/dd/yyyy mon/dd/yyyy mon/dd/yyyy, dd/mm/yyyy, DD/month/yyyy.
When you use SQL * Loader, I can see loading fails for records where we have formats such as LUN/jj/aaaa, Mon/dd/yyyy, DD/month/yyyy.
Is it possible in SQL * Loader where we can mention all these date formats so that data from that date should go smoothly in the underlying date column in the table.
Receive your answer on that.
Thank you
Madhu K.I think following could be the solution to your problem:
Suppose if you have data from four different date formats, you need to load the data into four different tables by running SQL * Loader four times and each time specify other date format in the control file whose data to load, and then at the end, merge data from these four different tables using the UNION clause.
Elya
-
SQL Loader Missing expression error.
Hi guru
I'm updating data from csv to database table. Here I am attaching my control file and log file... you can help resolve the following error message.
Control file:
Thanks and greetingsLOAD DATA INFILE 'C:\Users\bura.sami\Documents\MSBLive Oracle Objects.csv' BADFILE 'C:\Users\bura.sami\Documents\MSBLive Oracle Objects.bad' DISCARDFILE 'C:\Users\bura.sami\Documents\MSBLive Oracle Objects.dsc' INTO TABLE MSBLIVE_OBJECTS INSERT FIELDS TERMINATED BY "," optionally enclosed by '"' trailing nullcols ( INDEX_NAME CHAR "trim(Index)", TABLE_NAME CHAR "trim(Table)", VIEW_NAME CHAR "trim(View)", TRIGGER_NAME CHAR "trim(Trigger)", SEQUENCE_NAME CHAR "trim(Sequence)", PROCEDURE_NAME CHAR "trim(Procedure)", PACKAGE_NAME CHAR "trim(Package)", PACKAGE_OBJECT CHAR "trim(Package Body)", FUNCTION_NAME CHAR "trim(Function)" ) {code} *Error log:* {code} SQL*Loader: Release 10.2.0.1.0 - Production on Wed Nov 24 14:31:05 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Control File: simple_load.ctl Data File: C:\Users\bura.sami\Documents\MSBLive Oracle Objects.csv Bad File: C:\Users\bura.sami\Documents\MSBLive Oracle Objects.bad Discard File: C:\Users\bura.sami\Documents\MSBLive Oracle Objects.dsc (Allow all discards) Number to load: ALL Number to skip: 0 Errors allowed: 50 Bind array: 64 rows, maximum of 256000 bytes Continuation: none specified Path used: Conventional Table MSBLIVE_OBJECTS, 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 ------------------------------ ---------- ----- ---- ---- --------------------- INDEX_NAME FIRST * , O(") CHARACTER SQL string for column : "trim(Index)" TABLE_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(Table)" VIEW_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(View)" TRIGGER_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(Trigger)" SEQUENCE_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(Sequence)" PROCEDURE_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(Procedure)" PACKAGE_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(Package)" PACKAGE_OBJECT NEXT * , O(") CHARACTER SQL string for column : "trim(Package Body)" FUNCTION_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(Function)" Record 1: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 2: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 3: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 4: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 5: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 6: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 7: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 8: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 9: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 10: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 11: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 12: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 13: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 14: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 15: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 16: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 17: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 18: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 19: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 20: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 21: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 22: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 23: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 24: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 25: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 26: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 27: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 28: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 29: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 30: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 31: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 32: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 33: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 34: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 35: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 36: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 37: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 38: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 39: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 40: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 41: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 42: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 43: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 44: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 45: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 46: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 47: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 48: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 49: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 50: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 51: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run. Table MSBLIVE_OBJECTS: 0 Rows successfully loaded. 51 Rows not loaded due to data errors. 0 Rows not loaded because all WHEN clauses were failed. 0 Rows not loaded because all fields were null. Space allocated for bind array: 148608 bytes(64 rows) Read buffer bytes: 1048576 Total logical records skipped: 0 Total logical records read: 64 Total logical records rejected: 51 Total logical records discarded: 0 Run began on Wed Nov 24 14:31:05 2010 Run ended on Wed Nov 24 14:31:34 2010 Elapsed time was: 00:00:29.71 CPU time was: 00:00:00.03
SaamiHello
You can set your syntax for all areas (example here for only one field):
INDEX_NAME CHAR "trim(:INDEX_NAME)",
You can only refer to the names used as domain names.
Herald tiomela
http://htendam.WordPress.com -
Deploy the mapping of sql loader
Hello
I have a problem with OWB when I try to start a mapping (sql loader) after deployment. The problem is that when I start the execution of the mapping, sql loader control file is created not under Unix (where I set the location of the file entry and control file), but in the pc with my client OWB. For this reason execution fails because it can't find the input file (that I put in the unix machine).
Is there a configuration for the client or the server?
Thank youstart from unix machine
-
SQL Loader Control file - which represent decimal numbers
Hello
I use the version of database Oracle 10.2.0. I will receive a data file delimited pipe I need to load into the table specified below. Can you please suggest me how to represent the last column ERROR_PERCENT in the control file, which is number (3.2) in the table? I tried DECIMAL (3,2), EXTERNAL (3,2) DECIMAL against it and I get errors wasgetting. Help, please.
CREATE TABLE TRACK_ERRORS
(
ACCOUNT_ID NUMBER (7).
DATESTAMP TIMESTAMP (6).
SPECIFIC_RISK NUMBER (3).
STOCK_RISK NUMBER (3).
ERROR_PERCENT NUMBER (3.2)
)
OPTIONS (SKIP = 1)
DOWNLOAD THE DATA
INFILE 'C:\Sqlldr\Input\Track_Errors.dat '.
BADFILE "C:\Sqlldr\Track_Errors.bad."
DISCARDFILE 'C:\Sqlldr\Track_Errors.dis '.
ADD
IN THE TABLE "TRACK_ERRORS.
fields ended by ' |' SURROUNDED OF POSSIBLY "" "
TRAILING NULLCOLS
(Account_Id EXTERNAL INTEGER (7)
, datestamp 'Rtrim (to_date (:datestamp,'YYYY/MM/DD')).
Specific_Risk INTEGER EXTERNAL (3)
Stock_Risk INTEGER EXTERNAL (3)
ERROR_PERCENT
)
Kind regards
NaveenNaveen Kumar C wrote:
I tried with decimal external. It does not work. The following is the log fileSQL * Loader: Release 10.2.0.1.0 - Production on Thu Feb 25 10:11:42 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control file: track_errors.ctl
Data file: C:\Sqlldr\Input\Track_Errors.dat
Bad leadership: C:\Sqlldr\Track_Errors.bad
Delete the file: C:\Sqlldr\Track_Errors.dis
(Allow all releases)Number of loading: ALL
Number of jump: 1
Authorized errors: 50
Link table: 64 lines, maximum of 256000 bytes
Continuation of the debate: none is specified
Path used: classicsTable "TRACK_ERRORS', loaded from every logical record.
Insert the option in effect for this table: APPEND
TRAILING NULLCOLS option in effectColumn Position Len term Encl. Datatype name
------------------------------ ---------- ----- ---- ---- ---------------------
FIRST ARGUMENT ACCOUNT_ID 7 | O ("") CHARACTER
DATESTAMP NEXT * | O ("") CHARACTER
The SQL string for the column: "Rtrim (to_date (:datestamp,'YYYY/MM/DD')).
SPECIFIC_RISK 3 | O ("") CHARACTER
STOCK_RISK 3 | O ("") CHARACTER
ERROR_PERCENT NEXT * | O ("") CHARACTERSheet 1: Rejected - error on the table 'TRACK_ERRORS", the ERROR_PERCENT column.
ORA-01438: value larger than the precision specified for the columnSheet 2: Rejected - error on the table 'TRACK_ERRORS", the ERROR_PERCENT column.
ORA-01438: value larger than the precision specified for the columnSheet 3: Rejected - error on the table 'TRACK_ERRORS", the ERROR_PERCENT column.
ORA-01438: value larger than the precision specified for the columnTable "TRACK_ERRORS":
0 rows successfully loaded.
3 rows not loaded due to data errors.
0 rows not loading because all WHEN clauses were failed.
0 rows not populated because all fields are null.The space allocated to bind table: 34432 byte (64 lines)
Bytes of read buffer: 256000Ignored logical records total: 1
Total logical records read: 3
Total rejected logical records: 3
Total logical records ignored: 0Run started the Thu Feb 25 10:11:42 2010
Run finished the game Feb 25 10:11:55 2010Time was: 00:00:13.99
Time processor was: 00:00:00.14It does not work because of the data and not + external comma +.
These mistakes ORA-set out clearly that your data values are larger than the eligible accuracy.isotope
-
Would appreciate any help. 10.2.0.4 standard Edition on Windows 2003 64-bit.
My definition of the table is:
My SQL Loader Control file is:create table cfive (keywords varchar2(4000));
And my data are:LOAD DATA INFILE 'C:\Documents and Settings\Administrator.HORAE\Desktop\testdata.txt' APPEND INTO TABLE import.cfive FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS (KEYWORDS)
'active wear, young, ballerina, ballerina, ballet, ballerinas, Pointe Shoes,
Body, clothes, clothing dance, dancer, sweet, graceful, dance, education, shoes,
inside, instruction, isolation, Leotard, tutu, pensive, people, performance, skill, solitude,.
women, the preparation, the tying, studio shot.
(I broke which on several lines here, but in reality, it's a whole long line of text).
I invoke sqlloader as follows:
The program ends, but generates a log file that includes this:sqlldr import/xxxxxxx control=testctl.txt log=testlog3.txt bad=testbad3.txt
.. .and my line of data is not loaded. The log file says that keywords data of excessive length, but is of course not: the table allows 4000 characters, actual data are only 286 characters long.Control File: testctl.txt Data File: C:\Documents and Settings\Administrator.HORAE\Desktop\testdata.txt Bad File: testbad3.txt Discard File: none specified (Allow all discards) Number to load: ALL Number to skip: 0 Errors allowed: 50 Bind array: 64 rows, maximum of 256000 bytes Continuation: none specified Path used: Conventional Table IMPORT.CFIVE, loaded from every logical record. Insert option in effect for this table: APPEND TRAILING NULLCOLS option in effect Column Name Position Len Term Encl Datatype ------------------------------ ---------- ----- ---- ---- --------------------- KEYWORDS FIRST * , O(") CHARACTER Record 1: Rejected - Error on table IMPORT.CFIVE, column KEYWORDS. Field in data file exceeds maximum length Table IMPORT.CFIVE: 0 Rows successfully loaded. 1 Row not loaded due to data errors. 0 Rows not loaded because all WHEN clauses were failed. 0 Rows not loaded because all fields were null.
The database using WE8ISO8859P1 character set, bytes and characters should be equivalent to this opportunity.
I'm looking for indications as to why it does not work! Thank you in advance.Try to specify the maximum length of the data entry in SQL * Loader control file:
LOAD DATA INFILE 'testdata.txt' INTO TABLE cfive FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' (keywords char(4000)) {code} with testdata.txt on 1 line: {code} "active wear,young,ballerina,ballet dancer,ballet dancing,ballet slippers,pointe shoes,soft,bodysuit,clothing,dance wear,dancer,graceful,dancing,educated,female,footwear,indoors,instruction,isolation,leotard,tutu,pensive,people,performing,skill,solitude,women,preparing,tying,studio shot" {code} I get: {code} type testdata.log SQL*Loader: Release 10.2.0.1.0 - Production on Fri Oct 2 09:40:33 2009 Copyright (c) 1982, 2005, Oracle. All rights reserved. Control File: testdata.ctl Data File: testdata.txt Bad File: testdata.bad Discard File: none specified (Allow all discards) Number to load: ALL Number to skip: 0 Errors allowed: 50 Bind array: 64 rows, maximum of 256000 bytes Continuation: none specified Path used: Conventional Table CFIVE, loaded from every logical record. Insert option in effect for this table: INSERT Column Name Position Len Term Encl Datatype ------------------------------ ---------- ----- ---- ---- --------------------- KEYWORDS FIRST 4000 , O(") CHARACTER value used for ROWS parameter changed from 64 to 63 Table CFIVE: 1 Row successfully loaded. 0 Rows not loaded due to data errors. 0 Rows not loaded because all WHEN clauses were failed. 0 Rows not loaded because all fields were null. Space allocated for bind array: 252126 bytes(63 rows) Read buffer bytes: 1048576 Total logical records skipped: 0 Total logical records read: 1 Total logical records rejected: 0 Total logical records discarded: 0 Run began on Fri Oct 02 09:40:33 2009 Run ended on Fri Oct 02 09:40:33 2009 Elapsed time was: 00:00:00.08 CPU time was: 00:00:00.03
and
SQL> select length(keywords) from cfive; LENGTH(KEYWORDS) ---------------- 286
I use the customer of Oracle 10.2.0.1 database and Oracle 10.2.0.4 EE database.
-
Error loading throug sql loader
Hi all
Try using sql loader to data to CSV laod. However, during a load, I met with errors.
Please find below my newspaper, the control and the data file.
------------Ctl File----------------
Hare krishna
load data
discardfile 'c:\dis.log'
infile 'c:\csv\personal1.csv'
into table personal_expenses
fields terminated by ","
trailing nullcols
(PURCHASE_DATE date 'mm/dd/yy',PAYEE,RUPEE_SPENT,CATEGORY,SUB_CATEGORY,DESCRIPTION)
------------- Log FIle---------------------------
SQL*Loader: Release 10.1.0.2.0 - Production on Tue Aug 11 12:29:07 2009
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Control File: C:\control01.ctl.txt
There are 2 data files:
Data File: control01.ctl
Bad File: C:\control01.bad
Discard File: c:\dis.log
(Allow all discards)
Data File: c:\csv\personal.csv
Bad File: C:\personal.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table PERSONAL_EXPENSES, 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
------------------------------ ---------- ----- ---- ---- ---------------------
PURCHASE_DATE FIRST * , DATE mm/dd/yyyy
PAYEE NEXT * , CHARACTER
RUPEE_SPENT NEXT * , CHARACTER
CATEGORY NEXT * , CHARACTER
SUB_CATEGORY NEXT * , CHARACTER
DESCRIPTION NEXT * , CHARACTER
Data File control01.ctl -
Record 1: Discarded - all columns null.
Record 3: Discarded - all columns null.
Record 5: Discarded - all columns null.
Record 2: Rejected - Error on table PERSONAL_EXPENSES, column PURCHASE_DATE.
ORA-01858: a non-numeric character was found where a numeric was expected
Record 4: Rejected - Error on table PERSONAL_EXPENSES, column PURCHASE_DATE.
ORA-01858: a non-numeric character was found where a numeric was expected
Record 6: Rejected - Error on table PERSONAL_EXPENSES, column PURCHASE_DATE.
ORA-01858: a non-numeric character was found where a numeric was expected
Record 7: Rejected - Error on table PERSONAL_EXPENSES, column PURCHASE_DATE.
ORA-01858: a non-numeric character was found where a numeric was expected
Record 8: Rejected - Error on table PERSONAL_EXPENSES, column PURCHASE_DATE.
ORA-01858: a non-numeric character was found where a numeric was expected
Record 9: Rejected - Error on table PERSONAL_EXPENSES, column PURCHASE_DATE.
ORA-01858: a non-numeric character was found where a numeric was expected
Data File c:\csv\personal.csv -
Record 10: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 11: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 12: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 13: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 14: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 15: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 16: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 17: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 18: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 19: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 20: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 21: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 22: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 23: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 24: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 25: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 26: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 27: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 28: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 29: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 30: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 31: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 32: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 33: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 34: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 35: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 36: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 37: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 38: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 39: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 40: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 41: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 42: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 43: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 44: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 45: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 46: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 47: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 48: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 49: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 50: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 51: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 52: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 53: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
Record 54: Rejected - Error on table PERSONAL_EXPENSES, column RUPEE_SPENT.
ORA-01722: invalid number
MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
Table PERSONAL_EXPENSES:
0 Rows successfully loaded.
51 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
3 Rows not loaded because all fields were null.
Space allocated for bind array: 99072 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 73
Total logical records rejected: 51
Total logical records discarded: 3
Run began on Tue Aug 11 12:29:07 2009
Run ended on Tue Aug 11 12:29:08 2009
Elapsed time was: 00:00:00.55
CPU time was: 00:00:00.06
------------------------- Sample Data-----------------
04/05/09,Groceries,Withdrawal,83,Food,Groceries
05/05/09,Other,Withdrawal,50,Homeneeds,Other,,given to lali,
02/05/09,Groceries,Withdrawal,60,Food,Groceries,,Ice cream for all ,
05/05/09,Physcian,Withdrawal,400,Healthcare,Physician,,Consult to DR.ABBAS,
05/08/09,Dining Out,Withdrawal,35,Food,Dining out,,Juices,Ice cream,
05/07/09,Health,Withdrawal,120,Healthcare,Health,,Vasline Lotion,Cap Bcomplex,
05/10/09,clothing,Withdrawal,150,Homeneeds,Clothing,,Baby suit bought for Rupesh kid,
05/11/09,Physcian,Withdrawal,1500,Healthcare,Physician,,Ayurvedic Medicine from ABBASUsha,Me and Sonu,
05/11/09,Groceries,Withdrawal,55,Food,Groceries,,milk 1|2 kg, curd 1|2kg, sweet ,
05/17/09,Dining Out,Withdrawal,200,Food,Dining out,,me, sonu had dining out in bite-inkulfi,maze, special thali,
cold
05/17/09,Petorl,Withdrawal,300,Petrol,,,Petrol for CAR,
05/18/09,Health,Withdrawal,1500,Healthcare,Health,,Test : Ultrasound, Blood,
05/18/09,Physcian,Withdrawal,200,Healthcare,Physician,,ENT visit : Me,Poonam,
05/18/09,Health,Withdrawal,350,Healthcare,Health,,Medicine :-,
05/18/09,Dining Out,Withdrawal,165,Food,Dining out,,Dosa, lassi ,cold drinl ,shikanji , kulfi,
05/18/09,clothing,Withdrawal,730,Homeneeds,Clothing,,2 t shirt, 1lower , Braw , 1 purse
bindi , cluture , rubber bandlower Alok
05/21/09,Health,Withdrawal,325,Healthcare,Health,,Medicine bought for poona75+50.
Medicine start date is 21-may-09 for truboclosis,
05/21/09,Other,Withdrawal,100,Homeneeds,Other,,Rikshaw rent,
05/26/09,Internet,Withdrawal,550,Bills,Internet,,Gave sonu - 26-May-09,
05/30/09,Physcian,Withdrawal,200,Healthcare,Physician,,Dr. Sulabh Gupta consultation,
05/30/09,Groceries,Withdrawal,90,Food,Groceries,,Sweet ,
05/30/09,Party,Withdrawal,165,Leisure,Party,,Mc puff, Burger , Coke ,
05/30/09,Office food,Withdrawal,55,Food,Office food,,Lunch , Tea , Milk Bottel,
06/01/09,Medicine Alopathic,Withdrawal,538,Healthcare,Medicine Alopathic,,Poonam medicine + dendruf shampoo,
06/01/09,Fruits,Withdrawal,55,Food,Fruits,,Fruit juices + wayer bottel,
06/01/09,Gifts,Withdrawal,80,Gifts,,,sharpner, eraser,
06/01/09,Fruits,Withdrawal,55,Food,Fruits,,For poonam' home,
06/01/09,Dining Out,Withdrawal,50,Food,Dining out,,coke , curd , lays chipps,
06/04/09,Maintainance,Withdrawal,800,Maintainance,,,Bike Maintanence,
06/10/09,Medicine Alopathic,Withdrawal,250,Healthcare,Medicine Alopathic,,Medicine Sonu -- Dr Yogmaya.
06/10/09,Medicine Alopathic,Withdrawal,300,Healthcare,Medicine Alopathic,,Sonu medicine - Dr Salabh Gupta,
06/15/09,Medicine Alopathic,Withdrawal,570,Healthcare,Medicine Alopathic,,Medicine Poonam ,
06/22/09,Medicine Ayurvedic,Withdrawal,400,Healthcare,Medicine Ayurvedic,,Dr. Abbas,
06/22/09,Movies,Withdrawal,160,Leisure,Movies,,Movie -paying guest,
06/25/09,Dining Out,Withdrawal,150,Food,Dining out,,Chinees Combo+1 colddrink,
06/25/09,Internet,Withdrawal,550,Bills,Internet,,Internet payment,
06/29/09,Medical Test,Withdrawal,320,Healthcare,Medical Tests,,Blood Test :- Sonu - RA FACTOR,
06/29/09,Dining Out,Withdrawal,200,Food,Dining out,,Rasoi:- Special thali , cold drinks,
07/02/09,B'day,Withdrawal,1000,Leisure,B'day,,Mom's B'day,
07/01/09,Medicine Ayurvedic,Withdrawal,590,Healthcare,Medicine Ayurvedic,,Mine: Abbas,
07/02/09,B'day,Withdrawal,300,Leisure,B'day,,Afzal,
07/05/09,B'day,Withdrawal,1000,Leisure,B'day,,Amit B'day,
07/08/09,Travel,Withdrawal,2000,Vacation,Travel,,Trian tickets:-,
07/08/09,Dining Out,Withdrawal,1000,Food,Dining out,,During travelling to Gwalior,
07/16/09,Medicine Ayurvedic,Withdrawal,1000,Healthcare,Medicine Ayurvedic,,Dr. Abbas : Medicine Ayurvedic,
07/16/09,Petorl,Withdrawal,100,Petrol,,,For Bike,
07/17/09,Party,Withdrawal,290,Leisure,Party,,Office party : Dad earned golf medal.,
07/19/09,Other,Withdrawal,64,Homeneeds,Other,,Mother's in law--
07/20/09,Movies,Withdrawal,200,Leisure,Movies,,200 :- New York,
07/21/09,Dining Out,Withdrawal,200,Food,Dining out,,For movie,
07/21/09,clothing,Withdrawal,1700,Homeneeds,Clothing,,Sonu: 3 kurtas , one shirt usha,
07/23/09,Medicine Alopathic,Withdrawal,290,Healthcare,Medicine Alopathic,,Sonu's Medicine 10 days,
08/01/09,clothing,Withdrawal,200,Homeneeds,Clothing,,sonu leg-inns,
08/01/09,Give & take,Withdrawal,200,Bills,Give & Take,,sheetal for dress,
08/01/09,Give & take,Withdrawal,100,Bills,Give & Take,,given meenu,
08/02/09,Medicine Ayurvedic,Withdrawal,1400,Healthcare,Medicine Ayurvedic,,My Medicine from Dr Abbas,
08/03/09,Medicine Alopathic,Withdrawal,300,Healthcare,Medicine Alopathic,,Sonu's Medicine,
08/03/09,clothing,Withdrawal,100,Homeneeds,Clothing,,Stiching,
08/03/09,Cosmetics,Withdrawal,480,Homeneeds,Cosmetics,,Dio, Lipistick Nail color tec,
08/03/09,Outdoor foods,Withdrawal,100,Food,Outdoor foods,,lassi ras mala golgappe shikangi,
08/03/09,clothing,Withdrawal,60,Homeneeds,Clothing,,Peticote,
08/03/09,Give & take,Withdrawal,200,Bills,Give & Take,,given sheetal,
08/03/09,clothing,Withdrawal,150,Homeneeds,Clothing,,leg-inns for sonu,
08/06/09,Festivals,Withdrawal,1500,Leisure,Festivals,,1500 Rakshabandhan,
08/10/09,Dining Out,Withdrawal,150,Food,Dining out,,Bikaner-chineese plater-cold drink,
08/10/09,Medicine Ayurvedic,Withdrawal,150,Healthcare,Medicine Ayurvedic,,Sonu's Archiritis Medicine,
08/10/09,Give & take,Withdrawal,1000,Bills,Give & Take,,Komal's commettie,
08/19/09,clothing,Withdrawal,350,Homeneeds,Clothing,,Sonu's kurta,
08/20/09,Medicine Alopathic,Withdrawal,360,Healthcare,Medicine Alopathic,,Sonu's Medicine prscbd dr Alok,
08/20/09,Physcian,Withdrawal,200,Healthcare,Physician,,Ortopedic fee,
08/20/09,Dining Out,Withdrawal,75,Food,Dining out,,Burger carried from office,
08/20/09,other expences,Withdrawal,300,Vacation,other expences,,Return file fee,
08/20/09,Office food,Withdrawal,55,Food,Office food,,contrey rs 20 food rs 35,RUPEE_SPENT seems to be the fourth column in your sample data.
However, your control file indicates that it is in the third column?
Toon
Maybe you are looking for
-
Photosmart C410b: 10 Windows printer drivers
Hello When will there be windows 10 drivers for my printer HP Photosmart C410b all-in-one? I also have a friend with windows 10 who needs windows 10 for their 2 printers drivers HP Deskjet 2544 HP Photosmart 7520 Can someone let me know where I can g
-
HP OfficeJet Pro 8600 Plus: printer apps
I can't access my applications from the screen of the printer - I get the message unable to connect to the server, check the internet connections. Internet connections are very good. I can print emails to the printer and the apps that I have implem
-
Data acquisition task in not available in the student version?
Hi all Im trying to do something with the DAQmx task. But it's not in my service - fast - entry available, as you can see on the picture: Thanks for your help.
-
SMTP server keeps rejecting me with error Ox800ccc0F
I get an email, but can't send. SMTP.att.yahoo.com keeps rejecting me. Larry
-
Who have knowledge of the Femtocell (Xperia Z2 and Zperia Z) Sony technology
Contact request to a person with knowledge of the Femtocell (Xperia Z2 and Zperia Z) Sony technology. I have been unable to solve the mobile data connectivity issues with femtocell. The operator and I have tried a solution for 2 months now. The thing