SQLLoader: what clause fails

Hello
I'm working on a
Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
With partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

I have to load a file into 2 different tables and I am tring to do this using sqlloader and file of a single order.
This source file (part of):
"1","20110228155443","21970","671","3","","LISSETTE CAROLIN","MORALES COBO","","","V11283202","UBICAR123","","",""
"1","20110228160121","21971","671","3","","RAFAEL GREGORIO","BRIÃEZ ZAMBRANO","","0","","","","",""
"1","20110228160505","21972","14782","3","","Noelia","Parrales","","","RRHH","rrhh123","","",""
"1","20110228163120","21973","671","3","","JOSE GREGORIO","PEREZ","","0","","","","",""
"1","20110228165534","21974","671","3","","CARMEN","ARAUJO","","","V15753282","UBICAR123","","",""
"2","20110228044646","12005","1","0","","","Cellocator Test","4","0","COMPACT 268852","","","","","","","","",
"2","20110228084454","22012","1","3","","","POLO","22","0","EG727SV","20110223000000","MASSIMO","PAMELA","WVWZZZ6RZBY201299","","","","",
"2","20110228085219","20378","1","22","","","ASTRA","4","0","EF774ND","20110120000000","ER3497","X","WOLPF6EN3BG059489","","","","",
"2","20110228091127","22122","1","3","","","GOLF","4","0","EG766SV","20110224000000","BALGARION","VETURIA","WVWZZZ1KZBW215645","","","","",
And it's the control file:
OPTIONS ( DIRECT=FALSE,PARALLEL=TRUE, ERRORS=0, BINDSIZE=50000, ROWS=1000, READSIZE=65536)
LOAD DATA
CHARACTERSET UTF8
TRUNCATE

 INTO TABLE "STG_ITALY"."STG_USER"
  WHEN TYPE_ = "1"
 FIELDS terminated by ',' enclosed by '"' TRAILING NULLCOLS
  (
   "TYPE_" INTEGER EXTERNAL,
   "DATE_MODIFY" "TO_DATE(:DATE_MODIFY, 'YYYYMMDDHH24MISS')",
   "ID_USER" INTEGER EXTERNAL,
   "ID_USER_PARENT" INTEGER EXTERNAL,
   "I_TYPE_USER" INTEGER EXTERNAL,
   "COMPANY_NAME" CHAR,
   "FIRST_NAME" CHAR,
   "LAST_NAME" CHAR,
   "MIDDLE_NAME" CHAR,
   "I_NATIONALITY" INTEGER EXTERNAL,
   "LOGIN_NAME" CHAR,
   "LOGIN_PASSWORD" CHAR,
   "NOTE" CHAR,
   "DATE_VALID_TO" "TO_DATE(:DATE_VALID_TO, 'YYYYMMDDHH24MISS')",
   "ID_USER_VALID_TO" INTEGER EXTERNAL
  )

 INTO TABLE "STG_ITALY"."STG_VEHICLE"
  WHEN TYPE_ = "2"
 FIELDS terminated by ',' enclosed by '"' TRAILING NULLCOLS
  (
   "TYPE_" INTEGER EXTERNAL,
   "DATE_MODIFY" "TO_DATE(:DATE_MODIFY, 'YYYYMMDDHH24MISS')",
   "ID_VEHICLE" INTEGER EXTERNAL,
   "I_TYPE_VEHICLE" INTEGER EXTERNAL,
   "ID_BRAND_VEHICLE" INTEGER EXTERNAL,
   "ID_MODEL_VEHICLE" INTEGER EXTERNAL,
   "ID_FUEL_TYPE" INTEGER EXTERNAL,
   "MODEL" CHAR,
   "I_COLOUR" INTEGER EXTERNAL,
   "METALIC" INTEGER EXTERNAL,
   "PLATE_NUMBER" CHAR,
   "MATRICULATION" "TO_DATE(:MATRICULATION, 'YYYYMMDDHH24MISS')",
   "VOCAL_STD_PASSWORD" CHAR,
   "VOCAL_EMR_PASSWORD" CHAR,
   "FRAME_NUMBER" CHAR,
   "ENGINE_NUMBER" CHAR,
   "NOTE" CHAR,
   "DATE_VALID_TO" "TO_DATE(:DATE_VALID_TO, 'YYYYMMDDHH24MISS')",
   "ID_USER_VALID_TO" INTEGER EXTERNAL
  )
The problem is that I can fill just first table.
Once the clause of the second table always fails and no lines are written.

This is the log:
Table "STG_ITALY"."STG_USER":
  68 Rows successfully loaded.
  0 Rows not loaded due to data errors.
  680 Rows not loaded because all WHEN clauses were failed.
  0 Rows not loaded because all fields were null.


Table "STG_ITALY"."STG_VEHICLE":
  0 Rows successfully loaded.
  0 Rows not loaded due to data errors.
  748 Rows not loaded because all WHEN clauses were failed.
  0 Rows not loaded because all fields were null.
What I am doing wrong?

Thanks in advance

Try changing your controlfile to

OPTIONS ( DIRECT=FALSE,PARALLEL=TRUE, ERRORS=0, BINDSIZE=50000, ROWS=1000, READSIZE=65536)
LOAD DATA
CHARACTERSET UTF8
TRUNCATE

 INTO TABLE "STG_ITALY"."STG_USER"
  WHEN TYPE_ = "1"
 FIELDS terminated by ',' enclosed by '"' TRAILING NULLCOLS
  (
   "TYPE_" INTEGER EXTERNAL,
   "DATE_MODIFY" "TO_DATE(:DATE_MODIFY, 'YYYYMMDDHH24MISS')",
   "ID_USER" INTEGER EXTERNAL,
   "ID_USER_PARENT" INTEGER EXTERNAL,
   "I_TYPE_USER" INTEGER EXTERNAL,
   "COMPANY_NAME" CHAR,
   "FIRST_NAME" CHAR,
   "LAST_NAME" CHAR,
   "MIDDLE_NAME" CHAR,
   "I_NATIONALITY" INTEGER EXTERNAL,
   "LOGIN_NAME" CHAR,
   "LOGIN_PASSWORD" CHAR,
   "NOTE" CHAR,
   "DATE_VALID_TO" "TO_DATE(:DATE_VALID_TO, 'YYYYMMDDHH24MISS')",
   "ID_USER_VALID_TO" INTEGER EXTERNAL
  )

 INTO TABLE "STG_ITALY"."STG_VEHICLE"
  WHEN TYPE_ = "2"
 FIELDS terminated by ',' enclosed by '"' TRAILING NULLCOLS
  (
   "TYPE_" POSITION(1) INTEGER EXTERNAL,
   "DATE_MODIFY" "TO_DATE(:DATE_MODIFY, 'YYYYMMDDHH24MISS')",
   "ID_VEHICLE" INTEGER EXTERNAL,
   "I_TYPE_VEHICLE" INTEGER EXTERNAL,
   "ID_BRAND_VEHICLE" INTEGER EXTERNAL,
   "ID_MODEL_VEHICLE" INTEGER EXTERNAL,
   "ID_FUEL_TYPE" INTEGER EXTERNAL,
   "MODEL" CHAR,
   "I_COLOUR" INTEGER EXTERNAL,
   "METALIC" INTEGER EXTERNAL,
   "PLATE_NUMBER" CHAR,
   "MATRICULATION" "TO_DATE(:MATRICULATION, 'YYYYMMDDHH24MISS')",
   "VOCAL_STD_PASSWORD" CHAR,
   "VOCAL_EMR_PASSWORD" CHAR,
   "FRAME_NUMBER" CHAR,
   "ENGINE_NUMBER" CHAR,
   "NOTE" CHAR,
   "DATE_VALID_TO" "TO_DATE(:DATE_VALID_TO, 'YYYYMMDDHH24MISS')",
   "ID_USER_VALID_TO" INTEGER EXTERNAL
  )

(just add a keyword POSITION (1) by the second table)

Best regards

Maxim

Tags: Database

Similar Questions

  • Number of comparison in the sem_match filter clause failed to Jena

    Hello

    I have the following query of sem_match, which has a filter clause to compare a variable with a number. It works in oracle very well; but, he failed in Jena.

    Select interval_length

    table (sem_match ('{? dose_interval RDF: type: Dose_Interval.? dose_interval: dose_interval_hourly? interval_length.}))

    {filter (? interval_length < "6.0" ^ ^ xsd: Decimal)}'.

    sem_models ('test'),

    sem_rulebases ('owl2rl', 'testRules'),

    sem_aliases (sem_alias (", 'http://www.example.com/test#')), null))

    I run the query in Jena, but got the following error:

    Exception in thread "main" java.lang.Error: problems compiling pending:

    The operator * is not defined for the argument type java.lang.String, java.lang.String

    Syntax on the token "6.0" error, * expected

    Is this a bug or something wrong with my request? Thank you very much in advance.

    Hong

    Salvation Hong,

    SEM_MATCH works well on JDBC. (Adapter Jena has performed SEM_MATCH on JDBC for many years.)

    Now, I tried to compile your code and could not be compiled. After correction of some minor problems, I can compile it and run it without encountering errors.

    public class TestHong

    {

    public static String szJdbcURL = "jdbc:oracle:thin:@localhost:1521:orcl";

    public static String szUser = 'scott ';

    public static String szPasswd = "Tiger."

    public static String szModelName = "test";

    public static oracle Oracle new = Oracle (szJdbcURL, szUser, szPasswd);

    Public Shared Sub main (String [] szArgs) throws SQLException {}

    Chart GraphOracleSem = new GraphOracleSem (oracle, szModelName);

    Instruction stmt1d = null;

    try {}

    stmt1d = Oracle.GetConnection () .createStatement ();

    String res = null;

    String szQuery = "select interval_length ' +.

    "table (sem_match ('{?})). dose_interval RDF: type: Dose_Interval. ? dose_interval: dose_interval_hourly? interval_length. " +

    "filter (?). interval_length< \"6.0\"^^xsd:decimal)="" }',="" "="">

    "sem_models ('test'), ' +.

    "null," +

    "sem_aliases (sem_alias (", 'http://www.example.com/test.owl')), "+".

    "null));

    System.out.println ("Request is" + szQuery);

    ResultSet checkInterval = stmt1d.executeQuery (szQuery);

    System.out.println ();

    System.out.println ("* case 1: dose of the medication that is less than the recommended interval range *");

    System.out.println ();

    System.out.printf ("% - 25 s \n", "duration (hours)" ");

    System.out.println ();

    If (! checkInterval.isBeforeFirst ())

    {System.out.println ("OOPS! In case 1, the medication dose intervals were not ");

    System.out.println (); }

    else {}

    While (checkInterval.next ()) {}

    RES = checkInterval.GetString ("interval_length");

    System.out.printf ("" % - 25 s & \n, res);

    }

    }

    System.out.println ();

    }

    Finally {stmt1d.close () ;}

    }

    }

    This is the result I got against a model empty.

    Query is select table interval_length (sem_match ('{? dose_interval RDF: type: Dose_Interval.? dose_interval: dose_interval_hourly? interval_length. filter (? interval_length < "6.0"^^xsd:decimal)="" }',="" sem_models('test'), ="" null,="" sem_aliases(sem_alias('',=""> http://www.example.com/test.owl')}), null))

    * Case 1: meantime of dose of the medication that is less than the recommended interval

    Duration (hours)

    OOPS! In case 1, the medication dose intervals were not

    It will be useful,

    Zhe Wu

  • SQL Loader / WHAT clause / off swich? / bloated log files

    Hello everyone,

    I'm loading data using SQL-Loader very large source files. It all works very well.

    However, now, by using the WHEN clause (in the control file), I would like to only a very small subset of most load data. This also works very well...

    WHEN ARTICLECODE! '000000000000006769' =

    However, the log file becomes fully inflated with messages telling me to each record that does not have the WHEN clause...

    Record 55078: Discarded - failed all WHEN clauses.

    This becomes a problem because it slows down the process and creates large log files that eat upward of my disk space.

    There must be a simple command to allow me to disable the messages of thiese, but although I googled on it, I could not find it.

    Any ideas on this one? I don't know that it's simple.

    Best regards and many thanks,
    Alan Searle

    Try adding the SILENCE = RELEASES key sqlldr command

    Silent means - delete messages during execution (header, comments, errors, discards, partitions)

  • Regression: What clause omitted from the trigger editor when not logged in as the owner of the trigger

    I found that this reported in earlier versions of SQL Developer, so I guess it's a regression.   In addition, it was not clear how/where to report bugs so feel free to re - direct me to another forum.

    Version 4.0.1.14

    Unless I'm logged in as the owner of a trigger, the WHEN clause is missing when I discovered the source of order in the trigger Editor.    I've seen where this has been reported previously, but in this post, it was suggested that this should work for "privileged" users   In my case it does not even if I am logged in as a user with the DBA role.

    I find this a bug very serious because if you do not notice missing WHEN clause (you would have to know that it was supposed to be present) and you compile the trigger of the form of the editor he deletes the WHEN clause effectively and modifies the trigger behavior.

    Support of Oracle is the proper place to report bugs.

    We do our best for them to triage here, esp when it's a beta/adoptive parent early.

    This bug has been ID and fixed for the 4.0.2 patch which is soon.

  • BlackBerry Smartphones BB Protect: what can fail?

    My bb was stolen.  I was able to activate BB Protect before and I ordered it to wipe.  Is there something that the thief can do to derail the command?

    Berrier says:

    given the unit can was deleted, reinstalled the operating system, has obtained the new card/new sim number and used by someone out there)

    If none of these actions took place you indicated, your message via Protect or wipe will not work.

  • IQ505 "apllication failed failed to initialize error 0x800106b.

    some can help me here. I followed the link and still no luck.

    http://support.Microsoft.com/kb/931849/en-us

    what application fails, it's Windows Defender which fails to initialize, or is it another application?  Check your windows system and application event log - can provide you more information on what application is which is a failure... (Start-> run...) The Eventvwr.exe command and press enter)...

  • Satellite C660 - recovery disk fails error 1117

    Please can someone help. I tried to use my recovery disks to restore my laptop when it kept not start correctly. The disks did not work so I bought a set of discs from Toshiba on this Web site. I still have the same problem.

    What the failed hard drive or something else?

    If I buy a new hard drive recovery disks will work if the hard drive is not exactly the same as the one that is out?

    Hello

    Have you thought about the HARD drive?
    It could be a malfunction of the HARD drive that does not allow you to install the system.

    I recommend that you check the HARD disk for some potential problems.

    There is a nice tool called Drive Fitness Test. You can use it to check the HARD drive.
    Google simply to get the software.

  • Failed to install LifeCam HD-3000

    Hello

    I can't install Lifecam HD 3000 on a Win XP PC with all of the updates in the order.
    An error message appears during installation says it failed without and reason and gave the following link: http://support.microsoft.com/kb/953691

    I have gone through all the steps on this link, but does not help.

    I checked the people who have had the same problem, but no help, links below I checked

    • https://social.technet.Microsoft.com/forums/en/w7itprohardware/thread/9b07dba1-2b28-47bd-9423-e4db4b8b5a6f
    • http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-hardware/LifeCam-HD-5000-driver-and-software-installation/08e7300e-C32D-4595-9799-deb3016a8041
    • https://www.Microsoft.com/hardware/LifeCam/en-us/default.mspx
    • http://support.Microsoft.com/kb/973297
    • http://support.Microsoft.com/kb/953691

    I also tried mode of fail-safe with network enabled, logged as administrator, but with the same defect.

    Why can't download us manually the installation complete SW?
    (SW 'LifeCam3.60.exe' can be downloaded from

    • https://www.Microsoft.com/hardware/en-us/d/LifeCam-HD-3000

    is not a complete package of SW, it comes in contact with MS and download more things and that is what crashes, we can see the connection in a firewall schedule downloads about 5 MB, which is of ~ 10% of the progress bar up to what it fails, then obviously, the whole package, he wants DL exceeds > 50 MB)

    Please if possible give me a link for the complete SW a manual download, or where to find a generic webcam SW, if it is not please give some advice how to do this, thanks in advance.

    Hi I solved it, please read because it might help you too!

    When I opened this thread I tried for 4 hours to solve this problem * and apparently a lot of people have problems with the installation procedure.

    When I installed the program, I noticed at the beginning in a small window that shows progress, he showed a folder he had created and had a random name composed of letters and numbers such as: 56eb37a890142, go and find him!

    In this case, it creates subfolders where the subfolder has the name «windowsinstaller»

    • Drive:\56eb37a890142\windowsinstaller\x86\windowsxp-KB942288-v3-x86.exe

    (Your path may be different, but the mine was created on a different driver/partition that my Windows driver.)

    During installation, I was going through all the steps (in fact I just leave the installation in the middle of the process, as it is, if I remember there are 3 steps, first unpacking, the other 2 steps is displayed in a new window, and I don't remember now I did the 2nd step, however, this is the 3rd step that fails but in this hack you do not go there)
    ... instead, once the 56eb37a890142 folder was created, I went in the subfolder and installed the

    • WindowsXP-kb942288-v3 - x 86 .exe

    Once this file has been installed, Windows automatically forced the closure of programs and handed over in market, after reboot, I returned to the

    random 56eb37a890142 of the folder and double-click the following file

    • Setup.exe

    All of a sudden the installation went through, obviously something is wrong with the installation program, I think it not to apply the update of windowsxp-kb942288-v3 - x 86 .exe, or somehow fail to do.

    One last thing on the randomness of the '56eb37a890142' folder, I have a low memory, if the installation failed, the folder would be removed, so we might have to make a copy of it.

    Edit: I checked the Windows Installer "windowsxp-kb942288-v3 - x 86 .exe '.

    It's a "Windows Installer 4.5 Redistributable", it can be downloaded separately from the link here below, we could try this instead of the procedure described above:

    • https://www.Microsoft.com/en-US/Download/details.aspx?displaylang=en&ID=8483
  • Application has failed to start because msa32dl was not found, reinstalling the application may fix the problem

    How can I fix it?
    application has failed to start because msa32dl was not found, reinstaling the application may fix the problem

    First make sure that your system is clean in:

    Download, install, update and scan with these full free malware detection programs:

    Malwarebytes (MMFA): http://malwarebytes.org/

    SUPERAntiSpyware: (SAS): http://www.superantispyware.com/

    http://www.Microsoft.com/security/scanner/en-us/default.aspx Security Scanner   

    http://www.eset.com/us/online-scanner/ eset online scanner

    Then answer the following questions:

    brand and model of the pc

    current antivirus

    Operating system and service pack

    What application fails to start?

  • Update KB 976323 of security windows xp pro sp 3 fails

    automatic update repeatedly declares Christiane updateavailable & Ko 976323 is what allways fail ' going to microsoft update also updates star Filante but history nshows it installed repeatley

    then some time updating auto show it completed installation b ut will turn around a

    & ask for him again. I did uninstall for virtuall programs 3rd all pat anti virus tooolls and ran Mr repaired several times.

    all ideas

    Please any thoughts.

    Oh it looked after as fixed microsof IE 8 then he would go to my email & several other browser went very well, but IE 8 would open all web pages despite declaring upwards.

    Hi WilliamHeintz,

    You are able to correctly install the other updates?

    This problem occurs when one of the following conditions is true:

    (a) an error has occurred during installation. The update has not been installed.

    (b) the update has been installed. However, a file was not updated to restart the computer.

    You can follow this link & check if the problem persists:

    Troubleshooting Windows Update or Microsoft Update when you are repeatedly offered an update

    Hope the helps of information.

  • Compatible Windows Vista backup the failed 0x80070005: access is denied

    I am more able to backup my PC.  It fails with a 0 x 80070005 (access) refused.  I carefully watched the backup trying to glean what file fails when it tries to read it for the backup.  It fails on a file on the C: drive, but it happens too fast.  I can't determine the file name and THE EVENT LOG IS NOT THE NAME OF THE LOG FILE.  I have no idea how to solve this problem. My last successful backup was dec 2010.

    It would be a great start to save the file whose access is denied when the backup fails.  then we can proceed.

    Hi MickyLee3

     

    You can check if the problem occurs in a clean boot state. You can check if no service interferes with the backup. To perform the clean boot follow step 1 mentioned in the article below, and then try again check in the clean boot state -

    http://support.Microsoft.com/kb/929135

    If the problem is resolved check which service non-Microsoft is the source of the problem; referring to article and following the other steps.

     When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    a. Click Start, type msconfig.exe in the start search box and press ENTER.
    If you are prompted for an administrator password or for confirmation, type your password, or click on continue.

    b. on the general tab, click the Normal startup option and then click OK.

    c. When you are prompted to restart the computer, click on restart.

    I hope this helps.

  • My recycling bin icons fail to activate properly / affected by windows mail

    After 2 years works perfectly, my full/empty trash registered only now activate (on my desktop) after that I have enter or exit Windows Mail.

    IBC works normally otherwise. Only the change of icon does not have at the time. I have all of the default settings.

    Added; the bin function is normal. Bin, the bin or empty bin icon status does not change according to the condition of bin.

    If I empty the tray, the icon is complete. Then becomes later empty. (usually when I go into Windows mail)

    Suggested fix has not been set. Thank you

    > my only registered full/empty trash now activate (on my desktop) after I enter or exit Windows Mail

    > Only the icon change does not meet the time

    I'm sorry.

    None of the above 2 phrases doesn't make sense to me.

    > my recycle bin icons fail to activate properly / affected by windows mail

    That tells us it is NOT. And why blame Windows Mail so that it does not?

    If you don't mind, please repost your question in the short, separate sentences?
    Explanation of what it fails to perform is essential.

    If you don't want to do, take a look at these tutorials. See if any of them apply to you.

    Recycle Bin corrupted

    http://www.Vistax64.com/tutorials/131294-Recycle-Bin-corrupted-cannot-delete-file-folder.html

    Recyclle Bin:

    http://www.Vistax64.com/tutorials/66294-Recycle-Bin.html

  • some of my updates fail and it says: error 80070005

    some of my updates fail and it say error #8007005 how to fix this?

    Error code 0 x 80070005 is also described as ACCESS DENIED (you may not to install updates)

    Please check that you are logged into an account with administrative privileges.

    So what updates fail?

    What security software do you use?

    Have you tried to install the updates in a clean boot state?

    How to troubleshoot a problem by performing a clean boot in Windows Vista
    http://support.Microsoft.com/kb/929135

  • WindowsUpdate_80070663 what it means and how to fix this?

    Do not complete updates because of this error code, help!

    Hi JamesRubi,

    Do you know what update failed? Try to install the updates in a clean boot. This will eliminate the interference part 3 as being the cause.

  • What is the cause of the error M33QMS-5145NX-XD0021-60UQ03 on the product WA724U ID code

    My Pavillion dv7 Win7 can not start.  When I run the start-up test, I get the failure on product ID WA724U M33QMS-5145NX-XD0021-60UQ03 code. I have prepared a CD backup a month ago. Any help?

    Failure ID is generated only for the 3 components - battery, hard drive and memory. As its not not starting, it could be for the most part be the hard drive or memory as well.

    Please check the error log and see what exactly failed in order for the replacement. I guess that answered your question?

Maybe you are looking for

  • Sony remote control RM-VZ320?

    Why I can't rent on request or to access the options menu with my Sony remote control RM-VZ320?

  • FSX file: dem0303.bgl is not found or is corrupt, message during installation.

    I installed Windows 7 on my PC, and when I installed FSX Deluxe, an error indicating that a BGL file named dem0303 was not either or is inaccessible. Note: I ran the installer as administrator. I went to the directory and find the file. I retried the

  • WindowsUpdate: SelfUpdate check failed download package information, error = 0x80070005

    Windows Update does not work. However, I can download and install updates manually on microsoft.com. But it does not work automatically. To resolve this problem, I tried this: http://Windows.Microsoft.com/de-de/Windows7/Windows-Update-Error-80070002

  • Pavilion mouse does not

    Hi - I have a Pavillion DV5-1235DX, and the mouse suddenly stopped working.  I tried a flash drive in the 2 USB ports on the right side of the unit when the mouse is connected and the drive is not recognized in both.  The flash player works in port o

  • Using Office 2003 after replacement

    Can install us Office 2003 Professional Edition free for use at home on five computers, we replaced when we bought new computers with Office 2010? (We are a small office of 5 people).