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:
LOAD 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
Thanks and greetings
Saami

Hello

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

Tags: Database

Similar Questions

  • SQL * Loader-704: internal error

    Hi all
    I have run this command in windows
    sqlplus a/b@c
    It is connected, I can run sql and the results returned.

    However, I have run this command from sql loader
    sqlldr control = test.ctl a/b@c data = test.txt

    but the error is returned

    SQL * Loader-704: Internal error: ulconnect: OCIServerAttach [0]
    ORA-12154: TNS: could not resolve the connect identifier specified


    What are the reasons and why?
    Thank you very much!

    Hello Forreging.
    Srini said you that you must consider. SQL * Plus allows for a few characters that SQL * Loader. You should be able to use both $ (dollar sign) and _ (underscores stroke). Beyond these two special characters, my memory is incomplete. Your operating system might limit you also.

    Hope this helps,
    Luke

    Please check the answer as helpful or response, if it is so. If this is not the case, further clarification.
    Try to always provide create table and table insert to help members of the forum to help you.

  • SQL * Loader Control File - Error 510

    Hello!

    I am trying to load a file TXT using SQL * Loader, my control file is a little too big I guess: 83KO.

    The problem is the message I get:

    SQL * Loader: release 10.2.0.3.0 - Production on Qua game 16 11:18:58 2009

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    SQL * Loader-510: O registro fisico dados (C:\Teste\Exe548teste_zanthus.old.ctl) e but full o' maximo land (2147473647).

    The language is Brazilian Portuguese.

    But the size of the file is only 83 KB, not the maximum size. I'm confused.

    The data is a TXT file with more than 1000 characters per line.
    The problem is that the generated control file is 'bigger' than the maximum. The error is not from the data file (error in the control file, not the data file). If you want I can put the file here and a sample of the data file too.

    I guess that is not find expressions of the folklore of the control file, but there a tank < ENTER > at the EOF (CR + LF (I think).

    I really want to split the data file or in multiple files control file and then control the import with the software, which would be boring...

    I don't know if this information helps but my control file using multiple INTO TABLE...

    Thank you!

    I still feel that the problem is the end character.

    André Luis wrote:

    The comparison is ok since I have already tested with a small control file.

    The problem is not the size of the file, the problem is the size of the line, with a small control file sql loader to read the file only online, and in this case it works because it is under the limit for the size of the line. (The smal file perhaps has the same problems with the characters of late, but due to its size it recount not error.)

    I hope that I missed something in the creation of the control file, I think he tries to read data from it, despite the fact that I have to tell him otherwise, because I saw something to tell the size limit for a control file with data inside...

    The control file syntax is OK, I don't think that he search data in the control file.

    I insist on the fact that you are creating the control file with another editor, otherwise...

  • Function pivot and Missing expression error

    Select * from)
    Select T.PAT_MRN_ID, T.ABBREVIATION, TBL_WORKLFOw CONCEPT_VALUE T
    )
    Pivot
    (
    Max (concept_value)
    abbreviation (select short for TBL_WORKLFOW)
    )

    This request is to launch "missing expression"... error.

    Can anyone help to understand the problem.

    Hello

    Sorry, it does not work.
    You can only use a subquery in the pivot IN clause if you say ' PIVOT * XML *...» »
    You must use dynamic SQL statements to get no XML output for all values, if you can't hardcode in the query.

  • 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

  • SQL * Loader invalid number error

    I'm trying to load a .csv using SQL * Loader and all ranks is rejected with an error invalid number.

    Here is the control file:

    OPTIONS (SKIP = 1)
    DOWNLOAD THE DATA
    INFILE 'shi_claims.csv '.
    REPLACE IN THE TABLE SHI_CLAIMS
    FIELDS ENDED BY ',' POSSIBLY FRAMED BY "" "
    TRAILING NULLCOLS
    (
    ID TANK
    DECIMAL EXTERNAL AMT
    )

    Here are the first lines of data in the .csv (note I am ignoring the first line):

    EmployeeID, PaidAmnt
    100550393,0
    100709611,120.04
    100795648,90
    100795648,5.24

    Here is the structure of the table, I'm trying to load:

    CREATE THE TABLE UST_GLOBAL. SHI_CLAIMS
    (
    ID VARCHAR2 (9 CHAR),
    AMT NUMBER (8.2)
    )

    Here's the .log file that results. All ranks lands in the .bad file.

    SQL * Loader: Release 10.2.0.4.0 - Production on Mon Mar 7 16:34:09 2011

    Copyright (c) 1982, 2007, Oracle. All rights reserved.

    Control file: /u02/sct/ust/shi_claims.ctl
    Data file:././data.7609732
    Bad leadership: 7609732.bad
    Delete the file: discard.7609732
    (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: classics

    Table SHI_CLAIMS, loaded from every logical record.
    Insert the option in effect for this table: REPLACE TRAILING NULLCOLS option in effect

    Column Position Len term Encl. Datatype name
    ------------------------------ ---------- ----- ---- ---- ---------------------
    FIRST ID *, O ("") CHARACTER
    AMT NEXT *, O ("") CHARACTER

    Sheet 1: Rejected - error on the SHI_CLAIMS, AMT column table.
    ORA-01722: invalid number

    Sheet 2: Rejected - error on the SHI_CLAIMS, AMT column table.
    ORA-01722: invalid number

    (.. .and so forth for all ranks).

    I note that in the copy of the control file that is displayed in the .log file, the column AMT appears as a CHARACTER, while my control file means DECIMAL EXTERNAL. Could why, and this be part of the problem?

    Thanks for any help...

    Published by: wrfoster on March 8, 2011 09:40

    wrfoster wrote:
    Ideas on how to get rid of them?

    Well, ideally, if you can get rid of them when creating csv... If not do the AMT DUMP as I suggested previously to get the exact or the end characters ascii codes. Assuming that it is the new line of Chr (10) put the following text in the loader control file:

    AMT "RTRIM (:AMT,CHR(10)).

    SY.

  • The missing Expression error.

    Hi friends.

    I have a table called ACCESS_FORECAST.

    The structure of the table is like this


    I am trying to ask this but absent expression error is coming. Can anyone tell where my application is false.



    Concerning

    User_Apex wrote:

    SELECT CFPART_NUMBER ITEM_NUMBER,sum(CFMONTH1+CFMONTH2+CFMONTH3+CFMONTH4+CFMONTH5+CFMONTH6) QUANTITY
    FROM ACCESS_FORECAST
    where day_number = select max(day_number) from ACCESS_FORECAST
    GROUP BY CFPART_NUMBER ;
    

    You will need to put brackets where condition:

    where day_number = (select max(day_number) from ACCESS_FORECAST)
    
  • Missing expression error when cases is used as field

    I tried to write an expression that calculates how many days ago a request and return a value defined by the user if the calculation falls under the criteria in the case statement. The SQL view for the query I use is shown below:
    SELECT A.F_POSN_REQUEST_ID, A.F_REQ_ECP_STATUS, TO_CHAR(A.REQUEST_DTTM,'YYYY-MM-DD-HH24.MI.SS."000000"'), TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'), TO_CHAR(A.F_REQ_ECP_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'), TO_CHAR(A.F_REQ_ECP_PROC_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'), CASE WHEN(sysdate - TO_DATE(SUBSTR( TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),1,16),'YYYY-MM-DD-HH24.MI'))>60 THEN '>60' ELSE(CASE WHEN(sysdate - TO_DATE(SUBSTR( TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),1,16),'YYYY-MM-DD-HH24.MI')) >30 AND <=60 THEN '30 - 60' ELSE(CASE WHEN(sysdate - TO_DATE(SUBSTR( TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),1,16),'YYYY-MM-DD-HH24.MI'))>=15 AND <=30 THEN '15 - 30' ELSE(CASE WHEN(sysdate - TO_DATE(SUBSTR( TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),1,16),'YYYY-MM-DD-HH24.MI'))<15 THEN 'Less Than 15' ELSE NULL END)END)END)END)) 
      FROM PS_F_POSN_REQUEST A 
      WHERE A.F_REQ_ECP_STATUS IN ('I','O','P') 
      GROUP BY  A.F_POSN_REQUEST_ID,  A.F_REQ_ECP_STATUS,  TO_CHAR(A.REQUEST_DTTM,'YYYY-MM-DD-HH24.MI.SS."000000"'),  TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),  TO_CHAR(A.F_REQ_ECP_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),  TO_CHAR(A.F_REQ_ECP_PROC_DT,'YYYY-MM-DD-HH24.MI.SS."000000"')
    When I try to execute the query I get Message = ORA-00936: lack of expression (50 380)

    Any suggestions you could provide to help me clarify this error would be greatly appreciated.

    Published by: 992737 on March 8, 2013 09:07

    Hi, Peter,.

    Peter Gjelstrup wrote:
    ... OR

    select something,
    case your_expression
           when > 60
    then '>60'
           when > 30
    then '>30'
           when > 10
    then '>10'
    .
    etc.
    end
    something_else
    

    It really works when try you it?

    A CASE of Simple Expression (where you have an expression just after the CASE keyword and before the first WHEN) only check for equality. To use the inequality operators (such as >) you must use an Expression looked for CASES , such as

    CASE
       WHEN  exp > 60  THEN ...
       WHEN  exp > 30  THEN ...
    

    Repeat the expression exp each time.

  • Insert the missing expression error

    I am trying to insert data into sql plus, and I get this error message. I am new to this and have no idea what I'm doing wrong. Could someone please!
    Here is the table that I am inserting:
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    MANUFACTURER_ID NOT NULL NUMBER
    M_NAME VARCHAR2 (30)
    STREET VARCHAR2 (30)
    CITY VARCHAR2 (30)
    VARCHAR2 (20) STATE
    COUNTRY VARCHAR2 (30)
    WEBSITE VARCHAR2 (50)
    E-MAIL VARCHAR2 (50)
    FAX VARCHAR2 (15)

    I insert these values:

    SQL > insert into manufacturer values (9185247, rollinsonlightsportaircraft, route2box186, bloomfield_in_47424, in, US, 'www.eurofox-use.com', '[email protected]', 8123840518);
    insert into the reference values of the manufacturer (9185247, rollinsonlightsportaircraft, route2box186, bloomfield_in_47424, in, US, 'www.eurofox-use.com', '[email protected]', 8123840518)
    *
    ERROR on line 1:
    ORA-00936: lack of expression

    I worked on it forever and I'm just not getting it. Help, please!

    Try this:

    Insert in the reference values of the manufacturer (9185247, 'rollinsonlightsportaircraft', 'route2box186', 'bloomfield_in_47424', 'In', 'US', 'www.eurofox-use.com', '[email protected]', 8123840518)

    you pass the string values in this INSERT without putting the strings in single quotes. This is why you are getting the error. Values for all of the VARCHAR2 columns should be placed in single quotes.

  • SQL Loader in error after the modified table

    Hello

    "I had a column in the table that was initially defined as VARCHAR2 (250), I changed the table and made 1000, when the data is over 250 characters sql loader is in error"

    Field in the data file exceeds the maximum length. The table shows the field in VARCHAR2 (1000). Help, please.

    Thank you

    Gwenaël

    I changed the table again to make VARCHAR2 (4000) and still have the error. My data are about 350 characters. Help, please

    Change to the column sqlldr control file and explicitly set tank (4000).  The default data in sqlldr type is char (255).

  • 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
    SQL*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
    The table structure
    CREATE TABLE TH_XML
    (
      COL_ID_1   VARCHAR2(100 BYTE),
      IN_FILE_1  XMLTYPE
    )
    XMLTYPE IN_FILE_1 STORE AS CLOB (TABLESPACE SMDAT)
    XML (simple.xml) 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>
    Control file
    LOAD 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
    )
    LOG file
    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
    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?

    Thanks in advance.

    Published by: 876991 on 24 July 2012 14:18

    Hello

    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 error - reduced to bare bones

    I get the same error repeatedly when you try to use Sql Loader. So I reduced my load to a single record of test with 2 columns of text.



    The data file is "C:\data_dir\opps_test.csv" and simply looks like this:
    t | t



    Here is the control file:

    load data
    INFILE 'C:\data_dir\opps_test.csv '.
    in the opps_test table
    fields ended by ' |'
    (OPP_ID, CAMP_CODE)



    And here is a desc on the target table opps_test:

    OPP_ID VARCHAR2 (255)
    CAMP_CODE VARCHAR2 (255)



    When I run sql loader I get the following error on the screen and in my journal and I wonder if anyone has any idea what it really means. The data consists of just me typing t | t and save the csv file


    SQL * Loader: release 10.2.0.3.0 - Production Saturday, May 9, 22:12:19 2009

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    SQL * Loader-350: at line 1 syntax error.
    Illegal combination of nonalphanumeric characters
    {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset
    ^


    Thank you

    Published by: John W on May 9, 2009 22:31

    Your control file works for me just as you posted.

    Just a hunch...

    SQL*Loader-350: Syntax error at line 1.
    Illegal combination of non-alphanumeric characters
    {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset
    

    You save your control file or the data file with Microsoft Word or something other than a text editor?

  • Problem loading xml using sql loader file

    I am trying to load data into the table test_xml (xmldata XMLType)

    I have an xml file and I want any file to load in a single column

    When I use the following control file and run from the command-line as follows
    sqlldr $1@$TWO_TASK direct control=$XXTOP/bin/LOAD_XML.ctl = true; :

    DOWNLOAD THE DATA
    INFILE *.
    TRUNCATE INTO TABLE test_xml
    XmlType (XMLDATA)
    FIELDS
    (
    tank fill ext_fname (100),
    XMLDATA LOBFILE (ext_fname) COMPLETED BY expressions of folklore
    )
    START DATA
    U01/appl/apps/apps_st/appl/XXTop/12.0.0/bin/file. XML

    the file is loaded in the table perfectly.

    Unfortunately I can't hard-code the name of file as file name will be changed dynamically.

    so I removed the block

    START DATA
    U01/appl/apps/apps_st/appl/XXTop/12.0.0/bin/file. XML

    control file and tried to run by giving the following command line path

    sqlldr $1@$TWO_TASK control=$XXTOP/bin/LOAD_XML.ctl direct data=/u01/APPL/apps/apps_st/appl/xxtop/12.0.0/bin/file.xml = true;

    But strangely it attempts to load each line of the xml file in the table instead of the whole file

    Please find the log of the program with the error

    ------------------------------------------------------------------
    Loading XML through SQL * Loader begins
    ------------------------------------------------------------------
    SQL * Loader-502: cannot open the data file ' <? XML version = "1.0"? > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< root >' XMLDATA field table TEST_XML
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< ScriptFileType >' field XMLDATA table TEST_XML
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < Type > forms < / Type > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < / ScriptFileType > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< ScriptFileType >' field XMLDATA table TEST_XML
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < Type > PLL < / Type > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < / ScriptFileType > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< ScriptFileType >' field XMLDATA table TEST_XML

    Please help me how can I load full xml in a single column using command line without Hardcoding in the control file

    Published by: 907010 on January 10, 2012 02:24

    But strangely it attempts to load each line of the xml file in the table instead of the whole file

    Nothing strange, that the data parameter specifies the file containing the data to load.
    If you use the name of the XML here, the control file will try to interpret each line of XML as being separate ways.

    The traditional approach this is to have the name of the file stored in another file, say filelist.txt and use, for example:

    echo "/u01/APPL/apps/apps_st/appl/xxtop/12.0.0/bin/file.xml" > filelist.txt
    sqlldr $1@$TWO_TASK control=$XXTOP/bin/LOAD_XML.ctl data=filelist.txt direct=true;
    
  • SQL Loader for Oracle instant client 11

    I have a problem sqlldr.exe running on a machine having Oralce 11.1.0.6 instant client installed. I already copied all the DLL files it says that he needs and the whole repertoire of a machine with installation complete of RDBMS. This is the error I get:

    + SQL * Loader-704: Internal error: ulconnect: OCIEnvCreate [-1] +.

    I have no problem to connect what either using sqldeveloper. Are there files or the steps I'm missing?

    Thank you
    -Chris

    The add-on only supported for the moment customer is sqlplus, integration of other utilities is not supported. You can just mix DLLs of different software. There are a few documents on workarounds, for example:

    http://www.nyoug.org/presentations/2007/200703_Ji_Instant%20Client.PDF

    But no guarantee that it works and not support of Oracle.

    Werner

  • SQL Loader + CLOB

    Dear friends,

    Please guide me with this.
    LOAD DATA 
    INFILE 'D:\load\dat\Enquiry_reply.dat'
    BADFILE 'D:\load\bad\Enquiry_reply.bad' 
    DISCARDFILE 'D:\load\dat\discard\Enquiry_reply.dsc' 
    replace INTO TABLE OES_Enquiry FIELDS TERMINATED BY '['
    (Reply CLOBFILE("D:\load\dat\oes_enquiry_reply.dat") TERMINATED BY '[')
    What is bad here in this?
    I am getting error:
    *SQL*Loader-350: Syntax error at line 6.*
    Expecting "," or ")", found "CLOBFILE".
    (Reply CLOBFILE("D:\load\dat\enquiry_reply.dat") TERMINATED BY '['
    Please me tips on how to on this subject.

    Thanks in advance.

    Nith

    Published by: user645399 on November 30, 2010 18:58

    Hello

    Use single quotes inside of double quotes for the path and file name.

    + ("' D:\load\dat\oes_enquiry_reply.dat'") +.

    Thank you.

Maybe you are looking for