SQL Loader - Load multiple files in UNIX

HI all, I'm looking for a bit of help with using SQL LOADER to load multiple files into one table. I've had a look on the forums but still struggling with this one.
What I want to do is basically upload everything thats in /home/ib. I know you can use INFILE for several files in the control file but I have several hundred files to upload so this isn't practical. Can I pass the directory name as an INFILE parameter?
Any help would be appreciated.

On Unix you shouldn't worry about that. See this example :
[ora102 work db102]$ cat test11.dat
aaaaa,bbbbb
ccccc,ddddd
eeeee,fffff
[ora102 work db102]$ cat test12.dat
ggggg,hhhhh
jjjjj,kkkkk
lllll,mmmmm
[ora102 work db102]$ cat test13.dat
nnnnn,ooooo
ppppp,qqqqq
rrrrr,sssss
[ora102 work db102]$ cat load.sh
CTL=load.ctl
echo "load data" > $CTL
for DAT in test1*.dat
do
        echo "INFILE "$DAT >> $CTL
done
echo "replace"                  >> $CTL
echo "INTO TABLE test1"         >> $CTL
echo "fields terminated by ','" >> $CTL
echo "trailing nullcols"        >> $CTL
echo "( a, b )"                 >> $CTL
sqlldr test/test control=load.ctl
[ora102 work db102]$ ./load.sh
SQL*Loader: Release 10.2.0.1.0 - Production on Mon Oct 2 11:45:44 2006
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Commit point reached - logical record count 3
Commit point reached - logical record count 6
Commit point reached - logical record count 9
[ora102 work db102]$ sqlplus test/test
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 2 11:45:49 2006
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
TEST@db102 SQL> select * from test1 order by a,b;
A                    B
aaaaa                bbbbb
ccccc                ddddd
eeeee                fffff
ggggg                hhhhh
jjjjj                kkkkk
lllll                mmmmm
nnnnn                ooooo
ppppp                qqqqq
rrrrr                sssss
9 rows selected.
TEST@db102 SQL>                                                                              

Similar Messages

  • Error in loading the multiple file loading

    hi,
    i am following this blog to load the multiple files into rdbms table.
    http://www.odigurus.com/2011/05/multiple-files-single-target-table.html
    the problem is that when i assign the source Flat file Datastore
    Model Resource Name #Project_Name.FILE_NAME
    But when i point the Single File in the  Resource Name:EMP.DMP. its working fine. loaded suceessfully.... But problem in Multiple loading???
    it gives me error
    SQL*Loader-500: Unable to open file (E:/File/#Project_Name.FILE_NAME)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specified.
    SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
    ********************Task Error Code In Loading**********************************************
    import java.lang.String
    import java.lang.Runtime as Runtime
    from jarray import array
    import java.io.File
    import os
    import re
    ctlfile = r"""E:/File/Med_CDR_File.ctl"""
    logfile = r"""E:/File/Med_CDR_File.log"""
    outfile = r"""E:/File/Med_CDR_File.out"""
    oracle_sid=''
    if len('')>0: oracle_sid = '@'+''
    loadcmd = r"""sqlldr 'test/<@=snpRef.getInfo("DEST_PASS") @>%s' control='%s' log='%s' > "%s" """ % (oracle_sid,ctlfile, logfile, outfile)
    rc = os.system(loadcmd)
    if rc <> 0 and rc <> 2:
         raise "Load Error", "See %s for details" % logfile
    # Init Vars
    nbIns = 0
    nbRej = 0
    nbNull = 0
    strprt = ""
    maxAllowedError = r"""0"""
    c = 0
    flag = 0
    # Open log file
    f = open(logfile, "r")
    try:
         lines = f.readlines()
         for line in lines:
              if line.rstrip().upper().endswith(r"""TEST.TC$_0MSC_SMS:""".upper()):
                   flag = 1
                   c = 0
              if flag == 1:
                   if c > 0 and c <= 4:
                        if c == 1 :
                             nbIns = int(re.findall("\d+", line)[0])
                        elif c == 2:
                             nbRej = int(re.findall("\d+", line)[0])
                        elif c == 4:
                             nbNull = int(re.findall("\d+", line)[0])
                             break
              c+=1
         strprt = "\n\tIns:\t%s\n\tReject:\t%s\n\tNullField:\t%s" % (nbIns, nbRej, nbNull)
    finally:
         f.close()
    # if some rows has been rejected due to invalide data, check KM option LOA_ERRORS
    if rc == 2:
         if nbRej > int(maxAllowedError):
              raise strprt
              break
    waiting
    Regards,
    Edited by: AMSI on Nov 10, 2012 1:40 AM

    Hi AMSI,
    Did you try to run only the interface? It might not work.
    Try executing your interface from within a package. A previous step should refresh / set the variable.
    Regards,
    Jerome Fr

  • SQL*Loader with multiple files

    Gurus,
    I search the documentation and this forum and haven't found a solution to my issue yet...
    I am not expert of SQL*Loader. I have used SQL*Loader to copy from one file to a table many times. But I have not copied multiple files into one table especially with different names.
    More specifically....
    I need to load data from multiple files into a table. But the file names will be different each time. A file will be created every hour. The file name will consist of the root file name appended by a time stamp. For example, a file created on 10/07/2010 at 2:15 P.M. would be filea100720101415.txt while a file created on 10/08/2010 at 8:15 A.M. would be filea100820100815.txt. All the files will be in one directory.How can I load the data from the files using SQL*Loader?
    My database: Oracle 10g Release 2
    Operating System: Windows 2003 Server
    Please assist.
    Robert

    sect55 wrote:
    Gurus,
    I search the documentation and this forum and haven't found a solution to my issue yet...
    I am not expert of SQL*Loader. I have used SQL*Loader to copy from one file to a table many times. But I have not copied multiple files into one table especially with different names.
    More specifically....
    I need to load data from multiple files into a table. But the file names will be different each time. A file will be created every hour. The file name will consist of the root file name appended by a time stamp. For example, a file created on 10/07/2010 at 2:15 P.M. would be filea100720101415.txt while a file created on 10/08/2010 at 8:15 A.M. would be filea100820100815.txt. All the files will be in one directory.How can I load the data from the files using SQL*Loader?
    My database: Oracle 10g Release 2
    Operating System: Windows 2003 Server
    Please assist.
    RobertToo bad this isn't in *nix, where you get a powerful shell scripting capability. 
    That said, here is the core of the solution .... you will also need a way to identify files that have been processed vs. new ones. Maybe rename them, maybe move them. But with this sample you can see the basics. From there it is really an issue of DOS scripting, which would better be found by googling around a bit.
    cd c:\loadfiles
    FOR %%datfile IN (*.txt) DO SQLLDR CONTROL=sample.ctl, LOG=sample.log, BAD=baz.bad, DATA=%%datfileTry googling "dos scripting language". You'll find lots of tutorials and ideas on "advanced" (well, as advanced as DOS gets) techniques to solve your problem.
    Edited by: EdStevens on Dec 1, 2010 5:03 PM

  • Sql*loader map multiple files to multiple tables

    Can a single control file map multiple files to multiple different tables? If so, what does the syntax look like? I've tried variations of the following, but haven't hit the jackpot yet.
    Also, I understand that a direct load will automatically turn off most constraint checking. I'd like to turn this back on when I'm done loading all tables. How/when do I do that? I can find multiple references to 'REENABLE DISABLED CONSTRAINTS', but I don't know where to say that.
    TIA.
    LOAD DATA
    INFILE 'first.csv'
    TRUNCATE
    INTO TABLE first_table
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (a,b,c)
    INFILE 'second.csv'
    TRUNCATE
    INTO TABLE second_table
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (x,y,z,xx,yy,zz)
    etc.

    Here you go what you want..
    http://www.psoug.org/reference/sqlloader.html
    LOAD DATA
    INFILE 'c:\temp\demo09a.dat'
    INFILE 'c:\temp\demo09b.dat'
    APPEND
    INTO TABLE denver_prj
    WHEN projno = '101' (
    projno position(1:3) CHAR,
    empno position(4:8) INTEGER EXTERNAL,
    projhrs position(9:10) INTEGER EXTERNAL)
    INTO TABLE orlando_prj
    WHEN projno = '202' (
    projno position(1:3) CHAR,
    empno position(4:8) INTEGER EXTERNAL,
    projhrs position(9:10) INTEGER EXTERNAL)
    INTO TABLE misc_prj
    WHEN projno != '101' AND projno != '202' (
    projno position(1:3) CHAR,
    empno position(4:8) INTEGER EXTERNAL,
    projhrs position(9:10) INTEGER EXTERNAL)
    Thanks
    Aravindh

  • Flat file loading... how to automate the loading of multiple files

    HI Alll,
    I'm wondering if it's possible to create a routine that automates the loading of several flat files into a PSA table.
    I only want a single info package, and I would like this info package to load file 1, then load file 2, file 3 etc etc....
    The alternative is to create info packages for each flat file, but this seems clunky and inefficient.
    Is this possible?
    Regards,
    Frederick

    Hi,
    It is not possible with single infopackage. you have to create different infopackages. But you can put it in process chain in sequence to load different flat files.

  • SQL*Loader and multiple files

    Hello, am tasked with loading tables with 21+ million rows. Will SQL*Loader perform better with one large file or many smaller files? Is there any ideal file size for optimal performance? Thank you
    David

    Don, when I tried to loada 21M row table using direct, I get the following messages:
    Record 2373: Rejected - Error on table STAGE_CUSTOMER.
    ORA-03113: end-of-file on communication channel
    SQL*Loader-926: OCI error while uldlfca:OCIDirPathColArrayLoadStream for table STAGE_CUSTOMER
    SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
    SQL*Loader-925: Error while uldlgs: OCIStmtExecute (ptc_hp)
    ORA-03114: not connected to ORACLE
    SQL*Loader-925: Error while uldlgs: OCIStmtFetch (ptc_hp)
    ORA-24338: statement handle not executed
    Here is the SQL*Loader log:
    SQL*Loader: Release 9.2.0.1.0 - Production on Thu Apr 26 15:38:29 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Control File: stage_customer.ctl
    Character Set UTF8 specified for all input.
    First primary datafile stage_Customer_20070301.csv has a
    utf8 byte order mark in it.
    Data File: stage_Customer_20070301.csv
    Bad File: stage_Customer_20070301.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 1000
    Continuation: none specified
    Path used: Direct
    Silent options: FEEDBACK
    Table STAGE_CUSTOMER, 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
    ROW_ID SEQUENCE (MAX, 1)
    CUSTOMER_ACCT_NUM FIRST * , O(") CHARACTER
    IS_DELETED NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN UPPER(:Is_Deleted) IN ('FALSE','0') THEN 0 ELSE 1 END"
    NAME_PREFIX NEXT * , O(") CHARACTER
    FIRST_NAME NEXT * , O(") CHARACTER
    MIDDLE_NAME NEXT * , O(") CHARACTER
    LAST_NAME NEXT * , O(") CHARACTER
    NAME_SUFFIX NEXT * , O(") CHARACTER
    NICK_NAME NEXT * , O(") CHARACTER
    ALT_FIRST_NAME NEXT * , O(") CHARACTER
    ALT_LAST_NAME NEXT * , O(") CHARACTER
    MARKETING_SOURCE_ID NEXT * , O(") CHARACTER
    HOME_PHONE NEXT * , O(") CHARACTER
    WORK_PHONE NEXT * , O(") CHARACTER
    MOBILE_PHONE NEXT * , O(") CHARACTER
    ALTERNATE_PHONE NEXT * , O(") CHARACTER
    EMAIL_ADDR NEXT * , O(") CHARACTER
    ALT_EMAIL_ADDR NEXT * , O(") CHARACTER
    BIRTH_DATE NEXT * , O(") CHARACTER
    SQL string for column : "TRUNC(TO_DATE(:Birth_Date, 'MM/DD/YYYY HH24:MI:SS'))"
    SALES_CHANNEL_ID NEXT * , O(") CHARACTER
    SQL string for column : "decode(:Sales_Channel_id,NULL,NULL,NULL)"
    ASSOCIATE_NUMBER NEXT * , O(") CHARACTER
    ALT_ASSOCIATE_NUMBER NEXT * , O(") CHARACTER
    UPDATE_LOCATION_CD NEXT * , O(") CHARACTER
    UPDATE_DATE NEXT * , O(") CHARACTER
    SQL string for column : "TRUNC(TO_DATE(:Update_Date, 'MM/DD/YYYY HH24:MI:SS'))"
    CUSTOMER_LOGIN_NAME NEXT * , O(") CHARACTER
    DISCOUNT_CD NEXT * , O(") CHARACTER
    DISCOUNT_PERCENT NEXT * , O(") CHARACTER
    BUSINESS_NAME NEXT * , O(") CHARACTER
    POS_TAX_FLAG NEXT * , O(") CHARACTER
    POS_TAX_PROMPT NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN UPPER(:POS_TAX_PROMPT) IN ('FALSE','0') THEN 0 ELSE 1 END"
    POS_DEFAULT_TAX_ID NEXT * , O(") CHARACTER
    POS_TAX_ID_EXPIRATION_DATE NEXT * , O(") CHARACTER
    POS_AUTHORIZED_USER_FLAG NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN UPPER(:POS_AUTHORIZED_USER_FLAG) IN ('FALSE','0') THEN 0 ELSE 1 END"
    POS_ALLOW_PURCHASE_ORDER_FLAG NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN UPPER(:POS_ALLOW_PURCHASE_ORDER_FLAG) IN ('FALSE','0') THEN 0 ELSE 1 END"
    ADDRESS1 NEXT * , O(") CHARACTER
    ADDRESS2 NEXT * , O(") CHARACTER
    ADDRESS3 NEXT * , O(") CHARACTER
    CITY NEXT * , O(") CHARACTER
    STATE_CD NEXT * , O(") CHARACTER
    POSTAL_CD NEXT * , O(") CHARACTER
    COUNTRY_CD NEXT * , O(") CHARACTER
    ALLOW_UPDATE NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN UPPER(:ALLOW_UPDATE) IN ('FALSE','0') THEN 0 ELSE 1 END"
    ACTION_CODE NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN UPPER(:action_code) IN ('FALSE','0') THEN 0 ELSE 1 END"
    ACCOUNT_TYPE_ID NEXT * , O(") CHARACTER
    LOCALE_CD NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN :Locale_CD IS NOT NULL AND :Locale_CD LIKE '__-__' THEN :Locale_CD ELSE 'en-US' END"
    IS_READY_FOR_PROCESSING CONSTANT
    Value is '1'
    IS_BUSINESS CONSTANT
    Value is '0'
    HAD_ERRORS CONSTANT
    Value is '0'
    Record 2373: Rejected - Error on table STAGE_CUSTOMER.
    ORA-03113: end-of-file on communication channel
    SQL*Loader-926: OCI error while uldlfca:OCIDirPathColArrayLoadStream for table STAGE_CUSTOMER
    SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
    SQL*Loader-925: Error while uldlgs: OCIStmtExecute (ptc_hp)
    ORA-03114: not connected to ORACLE
    SQL*Loader-925: Error while uldlgs: OCIStmtFetch (ptc_hp)
    ORA-24338: statement handle not executed
    Table STAGE_CUSTOMER:
    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.
    Bind array size not used in direct path.
    Column array rows : 5000
    Stream buffer bytes: 256000
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 3469
    Total logical records rejected: 1
    Total logical records discarded: 0
    Direct path multithreading optimization is disabled
    Run began on Thu Apr 26 15:38:29 2007
    Run ended on Thu Apr 26 15:38:30 2007
    Elapsed time was: 00:00:01.18
    CPU time was: 00:00:00.32

  • Concatenating 2 files  in Unix and passing as input to SQL loader program

    Hi,
    I have 2 files file1_DDMMYY.csv and file_2_DDMMYY.csv
    I want to insert the 2 files using SQL Loader
    I am using the all_directories table to look at the directory path and file name passed for example \test\sdf\test\file_1_DDMMYY.csv
    I am presently using INFILE * in the Control File.Does it will take care of the 2 files for loading?Also the file  naming convention may vary depending upon the dates.for example it can have file_1_210214.csv or file_1_220214.
    Can we using concatenate and call the unix shell script and combine the 2 files to one and load the data using sql loader??
    How will be process of calling the shell program and pass the 2 files and combine it to one. (cat file_1_DDMMYY.csv file_2_DDMMYY.csv > file_1_DDMMYY.csv)
    Regards

    DUPLICATE thread
    FTPing multiple files in Server using Unix

  • Upload Multiple files in SQL * Loader in one session

    Dear all,
    I want to upload multiple files using SQL*Loader in one go. In Unix its very easy as I have a quite experience of that. Could any body tell what is a way in Windows to upload multiple files in one go while using SQL * Loader. I want to run that using DOS's Batch file.
    Thanks
    Ghulam

    In Unix its very easy like we are putting $ sign.
    sqlldr userid=?????/?????
    control="/u12/cad_delta.ctl",log="/u12/full_extract/$1",data="/u12/$1",bad="/u12//full_extract/$1",errors=500,silent=feedback
    Suggest for Windows? It should read all .DAT files of the Windows Folder.
    Thanks

  • Loading multiple files with SQL Loader

    Hello.
    I will appreciate your recommendation about the way to load multiple files (to multiple tables) using SQL Loader with only one Control file.
    file1 to load to Table1, file2 to load to Table2 etc.
    How the Control file should look like?
    I was looking on Web, but didn't find exactly what I need.
    Thanks!

    Ctl File : myctl.ctl
    ---------- Start ---------
    LOAD DATA
    INFILE 'F:\sqlldr\abc1.dat'
    INFILE 'F:\sqlldr\abc2.dat'
    INTO TABLE hdfc1
    (TRANS_DATE CHAR,
    NARRATION CHAR,
    VALUE_DATE CHAR,
    DEBIT_AMOUNT INTEGER,
    CREDIT_AMOUNT INTEGER,
    CHQ_REF_NUMBER CHAR,
    CLOSING_BALANCE CHAR)
    INTO TABLE hdfc2
    (TRANS_DATE CHAR,
    NARRATION CHAR,
    VALUE_DATE CHAR,
    DEBIT_AMOUNT INTEGER,
    CREDIT_AMOUNT INTEGER,
    CHQ_REF_NUMBER CHAR,
    CLOSING_BALANCE CHAR)
    -----------End-----------
    Sqlldr Command
    sqlldr scott/tiger@dbtalk control=F:\sqlldr\myctl.ctl log=F:\sqlldr\ddl_file1.txt
    Regards,
    Abu

  • SQL Loader to Load Multiple Tables from Multiple Files

    Hi
    I wish to create a control file to load multiple tables from multiple files
    viz.Emp.dat into emp table and Dept.dat into Dept table and so on
    How could I do it?
    Can I create a control file like this:
    OPTIONS(DIRECT=TRUE,
    SKIP_UNUSABLE_INDEXES=TRUE,
    SKIP_INDEX_MAINTENANCE=TRUE)
    UNRECOVERABLE
    LOAD DATA
    INFILE 'EMP.dat'
    INFILE 'DEPT.dat'
    INTO TABLE emp TRUNCATE
    FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"'
    (empno,
    ename,
    deptno)
    INTO TABLE dept TRUNCATE
    FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"'
    (deptno,
    dname,
    dloc)
    Appreciate a Quick Reply
    mailto:[email protected]

    Which operating system? ("Command Prompt" sounds like Windows)
    UNIX/Linux: a shell script with multiple calls to sqlldr run in the background with "&" (and possibly nohup)
    Windows: A batch file using "start" to launch multiple copies of sqlldr.
    http://www.pctools.com/forum/showthread.php?42285-background-a-process-in-batch-%28W2K%29
    http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/start.mspx?mfr=true
    Edited by: Brian Bontrager on May 31, 2013 4:04 PM

  • How to Load Multiple Files in Oracle Database using Sql Loader

    Hi All,
    I want to import multiple files in my DB using Sql*Loader. Please tell me the Syntax, how can I import multiple files using one Control File?
    Thanks & Regards,
    Imran

    Hi,
    You might get a good response to your post in the forum dedicated to data movement , including SQL*Loader . You can find it here Export/Import/SQL Loader & External Tables
    Regards,

  • Sql loader multiple files

    How can I load multiple input files ( monthwise 200601 to 200907) using sqlloader and a batchfile into tables like xxxx200601 etc
    any suggestions are welcome,
    thanks in advance
    Edited by: sunnysmiles on Jul 10, 2009 2:14 PM

    sunnysmiles wrote:
    How can I load multiple input files ( monthwise 200601 to 200907) using sqlloader and a batchfile
    LOAD DATA
      INFILE mon200601.dat
      INFILE mon200602.dat
      INFILE mon200603.dat
      INFILE mon200604.dat
      INFILE mon200605.dat
      INFILE mon200606.dat
      INFILE mon200607.dat
      APPEND
      INTO TABLE emp
      ( empno  POSITION(1:4)   INTEGER EXTERNAL,
        ename  POSITION(6:15)  CHAR,
        deptno POSITION(17:18) CHAR,
        mgr    POSITION(20:23) INTEGER EXTERNAL
    any suggestions are welcome,[loading data from multiple files|http://www.orafaq.com/wiki/SQL*Loader_FAQ#Can_one_load_data_from_multiple_files.2F_into_multiple_tables_at_once.3F], [official documentation|http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_concepts.htm#i1004677]
    thanks in advance

  • Using SQL*Loader to load a .csv file having multiple CLOBs

    Oracle 8.1.5 on Solaris 2.6
    I want to use SQL*Loader to load a .CSV file that has 4 inline CLOB columns. I shall attempt to give some information about the problem:
    1. The CLOBs are not delimited in the field level and could themselves contain commas.
    2. I cannot get the data file in any other format.
    Can anybody help me out with this? While loading LOB in predetermined size fields, is there a limit on the size?
    TIA.
    -Murali

    Thanks for the article link. The article states "...the loader can load only XMLType tables, not columns." Is this still the case with 10g R2? If so, what is the best way to workaround this problem? I am migrating data from a Sybase table that contains a TEXT column (among others) to an Oracle table that contains an XMLType column. How do you recommend I accomplish this task?
    - Ron

  • Sql loader: loading external file into blob

    hi,
    i keep being blocked by loading external binary files into a blob columns with sql loader tool.
    Here is the problem:
    I want to load pictures into a table with lob columns. Here is my control file, data file and the error message:
    control file:
    LOAD DATA
    APPEND
    INTO TABLE T_K58_SYMBOLE
    FIELDS TERMINATED BY ';' TRAILING NULLCOLS
    SYMB_ID INTEGER EXTERNAL(8),
    SYMB_LMLABEL CHAR(100),
    imgName FILLER,
    SYMB_GIF_HI BFILE(CONSTANT ".", imgName),
    thumbName FILLER,
    SYMB_GIF_LOW BFILE(CONSTANT ".", thumbName)
    data file:
    1;0800;image1.gif;image1.gif;
    error message:
    SQL*Loader-418: Bad datafile datatype for column SYMB_GIF_HI
    Here is the script of the creation of my table in my database:
    create table T_K58_SYMBOLE (
    SYMB_ID NUMBER(8) not null,
    SYMB_LMLABEL VARCHAR2(100),
    SYMB_GIF_HI BLOB,
    SYMB_GIF_LOW BLOB,
    constraint PK_T_K58_SYMBOLE primary key (SYMB_ID)
    LOB (SYMB_GIF_HI, SYMB_GIF_LOW) STORE AS (tablespace TDK5813)
    tablespace TDK5811
    Please, i need help!!!!

    This is my control file. I'm loading images in database table using sqlldr in Unix:
    LOAD DATA
    INFILE 'sampledata.dat'
    INTO TABLE image_table
    APPEND
    FIELDS TERMINATED BY ',' optionally enclosed by '"'
    IMAGE_ID INTEGER EXTERNAL,
    FILE_NAME CHAR,
    IMAGE_DATA LOBFILE(FILE_NAME) TERMINATED BY EOF
    I'm facing following error:
    SQL*Loader-350: Syntax error at line 9.
    Expecting "," or ")", found "LOBFILE".
    IMAGE_DATA LOBFILE(FILE_NAME) TERMINATED BY EOF
    My data file is:
    1,"IMG_3126.jpg"
    2,"IMG_3127.jpg"
    3,"IMG_3128.jpg"
    and images are in the same server. please help me to get out of this.
    Thanks,
    Surjeet Kaur

  • Multiple Files Loading

    Hi
    I have requirement to load multiple files into oracle database. I am in confusion whether i should use Sql Loader scripts to load or create a mapping in OWB for better performance.
    Could someone suggest which one gives best solution?
    P.S: All files are same format

    If you use a file as a source in a mapping OWB will generate a SQL*Loader mapping. You can configure the file operator to load many files, it can also be supplied as a parameter.
    Cheers
    David

Maybe you are looking for

  • Questions on printing in htmldb

    I try to create an invoice page to print. Some questions I ask to myself: - Is it possible to print to an A4 (papersize)? (I mean, does the application have notions of pagesize or is everything controlled by the browser? this is important when you ne

  • How to create Primary key

    I want to insert HOSTID that has unique values in a new application in a primary key column in database. I am starting with h000000001 and I want to go from that to h000000002 and .... h0000000010 , 11, 12 etc etc. How do I do this? I did this: rs =

  • JTextField array

    I�m using an array of jTextFields within a pane and I want to know which of this jTextFields was edited. I used the getSource method but I cannot interpret the data since I don�t get the index of the jTextField.

  • Interesting problem - Blue Channel

    Okay I just got back off of vacation, so my computer has been off for two weeks.  Nothing has changed, but now I have this problem.  When toggling between workspace (monitor and windows RGB), it turns everything black and white (not really), but it d

  • .CONNECT DB scott/tiger@inventory

    I want to use this in my form. I want to use different login for different form in a menu. Could you please tell me how I can do this? thanks