Bulk Load data without specifying column names in control file

I am totally new to the world of Oracle databases and am having some trouble doing some basic data imports from a csv file. I have a large amount of data in an excel spreadsheet (a couple hundred columns by varying numbers of rows from 2- several thousand) which I want to import into my Oracle 11g Database. Currently I am trying to use sql loader and specify the import syntax in the control file. From the examples I've seen so far, it seems you must specify the columns individually for what you are importing. This is simply not reasonable for several hundred columns of data.
Is there sql loader syntax (or a better method all together) to import a comma delimited csv or excel spreadsheet into an oracle database where it automatically generates a table and columns based on the data in the target import file? Even if I must first create the table in the database, my key issue is being able to generate the column names during import to match the column headers in the import file. I appreciate any help you could provide.
FYI here is my first meager attempt at importing a comma delimited csv, here is my ctl file:
load data
infile 'C:\filepath\mock_data.csv'
into table allData
fields terminated by "," optionally enclosed by '"'
It says Syntax error at line 4. Expecting "(", found end of file.
I suspect there is more at issue here than a missing "("

You have to create the control file to map to the table.
Since you would already have created the tables, you could generate the controlfiles based on the table structures.
See the "unloader.zip" file under the Files link at http://asktom.oracle.com
-- it has scripts to create unload a table to a flat file and to create the SQLLoader controlfile to reload that data to another target database. It would be the second set of scripts that you can use.
Hemant K Chitale

Similar Messages

  • Inserting values for all records except 1 or 2 column ,without specify column names.,?

    Hi,
    for example, in student table i am having 1000 columns,  column names like(id ,name,class, dept,etc,.).
    i want to insert 998 fields to department table from student tables except(id,class).
    i don't want to mention all column names in the insert command,
    is there any possibilities to filter the column names in insert command like (EXCEPT, NOT IN).
    Thanks in advance..

    duplicate of
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b31fa034-5b8f-42e4-b4e1-592a632ca6a5/inserting-values-for-all-records-except-1-or-2-column-without-specify-column-names?forum=sqlce
    please dont cross post
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 3 (NumberOfMultipleMatches).

    Hi,
    I have a file where fields are wrapped with ".
    =========== file sample
    "asdsa","asdsadasdas","1123"
    "asdsa","asdsadasdas","1123"
    "asdsa","asdsadasdas","1123"
    "asdsa","asdsadasdas","1123"
    ==========
    I am having a .net method to remove the wrap characters and write out a file without wrap characters.
    ======================
    asdsa,asdsadasdas,1123
    asdsa,asdsadasdas,1123
    asdsa,asdsadasdas,1123
    asdsa,asdsadasdas,1123
    ======================
    the .net code is here.
    ========================================
    public static string RemoveCharacter(string sFileName, char cRemoveChar)
                object objLock = new object();
                //VirtualStream objInputStream = null;
                //VirtualStream objOutStream = null;
                FileStream objInputFile = null, objOutFile = null;
                lock(objLock)
                    try
                        objInputFile = new FileStream(sFileName, FileMode.Open);
                        //objInputStream = new VirtualStream(objInputFile);
                        objOutFile = new FileStream(sFileName.Substring(0, sFileName.LastIndexOf('\\')) + "\\" + Guid.NewGuid().ToString(), FileMode.Create);
                        //objOutStream = new VirtualStream(objOutFile);
                        int nByteRead;
                        while ((nByteRead = objInputFile.ReadByte()) != -1)
                            if (nByteRead != (int)cRemoveChar)
                                objOutFile.WriteByte((byte)nByteRead);
                    finally
                        objInputFile.Close();
                        objOutFile.Close();
                    return sFileName.Substring(0, sFileName.LastIndexOf('\\')) + "\\" + Guid.NewGuid().ToString();
    ==================================
    however when I run the bulk load utility I get the error 
    =======================================
    Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 3 (NumberOfMultipleMatches).
    ==========================================
    the bulk insert statement is as follows
    =========================================
     BULK INSERT Temp  
     FROM '<file name>' WITH  
      FIELDTERMINATOR = ','  
      , KEEPNULLS  
    ==========================================
    Does anybody know what is happening and what needs to be done ?
    PLEASE HELP
    Thanks in advance 
    Vikram

    To load that file with BULK INSERT, use this format file:
    9.0
    4
    1 SQLCHAR 0 0 "\""      0 ""    ""
    2 SQLCHAR 0 0 "\",\""   1 col1  Latin1_General_CI_AS
    3 SQLCHAR 0 0 "\",\""   2 col2  Latin1_General_CI_AS
    4 SQLCHAR 0 0 "\"\r\n"  3 col3  Latin1_General_CI_AS
    Note that the format file defines four fields while the fileonly seems to have three. The format file defines an empty field before the first quote.
    Or, since you already have a .NET program, use a stored procedure with table-valued parameter instead. I have an example of how to do this here:
    http://www.sommarskog.se/arrays-in-sql-2008.html
    Erland Sommarskog, SQL Server MVP, [email protected]

  • "write to measurement file" specify column names

    I'm using "Write to measurement file" VI to create a TDMS file from 2 and possiby more data sources. Currenty the columns are titled "Untitled", "Untitled1", etc. I would like to specify column names. Can anyone point me to an example or tell me how to do this?
    Thanks,
    Ron

    Hi,
    I've done some project with TDMS a few times and you can wire the column names (channel names) to the VI.  See attachement
    Kind regards,
    - Bjorn -
    Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's
    LabVIEW 5.1 - LabVIEW 2012
    Attachments:
    TDMS.JPG ‏24 KB

  • Calculation Field to be mapped to different data object's column name in Oracle BAM 12c

    Hi,
    I am having a challenge to enable drill down to 2nd level report by passing calculation field as parameter.
    As an alternative, I am thinking to point calculation field to another data object’s column name and generate report so that I would be able to pass that as parameter to drilling report view.
    Is there any way to map calculation field to different Data object’s column name? Thanks in advance.
    Regards
    Amik Basu

    1. Yes, you can.
    SQL> create table ÜÝÞ( ßàá number(10));
    Table created.
    SQL> insert into ÜÝÞ values (10);
    1 row created.1.1 and 1.2 and 2. You can choose UTF as your default character set. It allows the user of non-English characters in VARCHAR columns in your whole database. It is not per tablespace.
    SQL> create table ÜÝÞ( ßàá varchar2(100));
    Table created.
    SQL> insert into ÜÝÞ values ('âãäçìé');
    1 row created.

  • Function short dump - A dynamically specified column name is unknown.

    Hello,
    I've created BRF fuction according to the  Note 1466868 - Dunning by collection strategy with BRFplus. I get short dump during simulation of function with following exception:
    "A dynamically specified column name is unknown. "
    Runtime Errors         SAPSQL_INVALID_FIELDNAME
    Exception              CX_SY_DYNAMIC_OSQL_SEMANTICS
    No.   Ty.          Program                             Include                             Line
          Name
       19 METHOD       CL_FDT_ELEMENT================CP    CL_FDT_ELEMENT================CM012   129
          CL_FDT_ELEMENT=>GET_VALUES_DDIC
       18 METHOD       CL_FDT_ELEMENT================CP    CL_FDT_ELEMENT================CM011   124
          CL_FDT_ELEMENT=>GET_VALUES
       17 METHOD       CL_FDT_WD_RENDER_VALUE_INPUT==CP    CL_FDT_WD_RENDER_VALUE_INPUT==CM00G   139
          CL_FDT_WD_RENDER_VALUE_INPUT=>VALIDATE_VALUES
    In my opinion there is uncorrect query.
    Current version:
    .  SELECT FIKRS AS VALUE NAME AS TEXT FROM FMBS_BS_T
        INTO CORRESPONDING FIELDS OF TABLE lt_value
        WHERE LANGU EQ 'E'.
    instead of:
    .  SELECT FM_AREA AS VALUE NAME AS TEXT FROM FMBS_BS_T
        INTO CORRESPONDING FIELDS OF TABLE lt_value
        WHERE LANGU EQ 'E'.
    My sap version:
    EHP4 FOR SAP ERP 6.0 / NW7.01
      SAP_BASIS     701     0003     SAPKB70103
    Do you know any note or solution  to resolve this problem.
    Best regards,
    Jacek Witczak

    Hi, I came back to working on "Dunning by collection strategy with BRFplus". According to your sugestions, I raised the level of components:
    SAP_BASIS Level 09
    SAP_ABA level 09
    PI_BASIS level 09
    SAP_BW level 09
    But still I have the same short dump.
    Shoudl we raise any other components? Maybe you know note, which resolve this problem?

  • How to Select data using same column name from 3 remote database

    Hi,
    Can anyone help me on how to get data with same column names from 3 remote database and a single alias.
    Ex.
    SELECT *
    a.name, b.status, SUM(b.qty) qantity, MAX(b.date) date_as_of
    FROM
    *((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)a,*
    *(table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)b)*
    WHERE b.dept = 'finance'
    AND a.position = 'admin'
    AND a.latest = 'Y' AND (b.status <> 'TRM') AND b.qty > 0;
    GROUP BY a.name, b.status ;
    NOTE: the bold statements is just an example of what I want to do but I always gets an error beacause of ambiguous columns.
    Thanks in advnce. :)
    Edited by: user12994685 on Jan 4, 2011 9:42 PM

    user12994685 wrote:
    Can anyone help me on how to get data with same column names from 3 remote database and a single alias.Invalid. This does not make sense and breaks all scope resolution rules. And whether this is in a single database, or uses tables across databases, is irrelevant.
    Each object must be uniquely identified. So you cannot do this:
    select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a3 objects cannot share the same alias. Example:
    SQL> select * from (dual, dual) d;
    select * from (dual, dual) d
    ERROR at line 1:
    ORA-00907: missing right parenthesisYou need to combine the objects - using a join or union or similar. So it will need to be done as follows:
    SQL> select * from (select * from dual d1, dual d2) d;
    select * from (select * from dual d1, dual d2) d
    ERROR at line 1:
    ORA-00918: column ambiguously definedHowever, we need to have unique column names in a SQL projection - so the join of the tables need to project a unique set of columns. Thus:
    SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d;
    DUM DUM
    X   X
    SQL> I suggest that you look closely at what scope is and how it applies in the SQL language - and ignore whether the objects referenced are local or remote as it has no impact to fundamentals of scope resolution.

  • Jump to next frame label without specifying a name

    Is it possible to jump to next frame label without specifying
    the name of the frame label?
    For example instead of saying
    on (release) {
    gotoAndPlay("Step_02");
    I wanted it just to go to next available frame label.
    Thanks
    Jonas

    not with actionscript 2.

  • Can I increase heap memory without specify any class or jar file??

    Hi,
    I tried to increase my heap memory in this way :
    java -Xms256m -Xmx256m
    but I got an error ... it's seem that I must specify a class java or a .jar file ...
    This is the error :
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)
    where options include:
    -client to select the "client" VM
    -server to select the "server" VM
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.
    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
    A ; separated list of directories, JAR archives,
    and ZIP archives to search for class files.
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -version:<value>
    require the specified version to run
    -showversion print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
    include/exclude user private JREs in the version search
    -? -help print this help message
    -X print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
    enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
    disable assertions
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    -agentlib:<libname>[=<options>]
    load native agent library <libname>, e.g. -agentlib:hprof
    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
    load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
    load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
    show splash screen with specified image
    can I increase heap memory without specify any class or jar file??
    thx

    chiara wrote:
    Hi,
    I tried to increase my heap memory in this way :
    java -Xms256m -Xmx256m
    but I got an error ... it's seem that I must specify a class java or a .jar file ...
    This is the error :
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)
    can I increase heap memory without specify any class or jar file??The job of java.exe is to execute java bytecode.
    What is it supposed to do with your request to use 256m of memory for heap
    when you are not giving it a class or a jar to run?

  • How can i get the column names in CSV file.

    Hi,
    After execution of infospoke i can not see the column names in that file.How can i get column of respective infoprovider?
    Thanks,
    Gananadha Lenka

    Hello Gana,
    Actually while exporting the data using Info Spoke, we have the possibility to modify the data that we send. This is possible using transformations.
    In your Info Spoke, you have a tab called Transformations.
    Here you need to create an implementation and then use BADi to populate data.
    Check if you can write a start routine sort of thing here and insert a new record into the internal table by hardcoding with your field headings.
    Let me know if you dont know how to create transformations.
    Kris...

  • If it is not specified,Oracle creates one control file in a default locatio

    Hi
    The CONTROL_FILES parameter is not required when you create a database. If it is not specified,Oracle creates one control file in a default location,.
    Where oracle create contol file default in this condition
    Thanks

    Can you try to create a database and see
    FYI
    It creates in $ORACLE_HOME\database folder..if not specified but in UNIX i think it will be under $ORACLE_HOME/dbs
    Because i dont have UNIX right now to test it
    Message was edited by:
    Maran Viswarayar

  • Data load component - add new column name alias

    Apex 4.2.2.
    Using the data load wizard a list of column and column name aliases had been created.
    When looking at the component (shared components/Data load tables/column name aliases) it is possible to edit and delete a column alias there. Unfortunatly it does not seem possible to add a new alias. Do I overlook something, or is there a workaround for this?

    Try this:
    REPORT ztest LINE-SIZE 80 MESSAGE-ID 00.
    DATA: name_int TYPE TABLE OF v_usr_name WITH HEADER LINE.
    DATA: BEGIN OF it_bkpf OCCURS 0.
            INCLUDE STRUCTURE bkpf.
    DATA:   username LIKE v_usr_name-name_text,
          END   OF it_bkpf.
    SELECT * FROM bkpf INTO TABLE it_bkpf UP TO 1000 ROWS.
    LOOP AT it_bkpf.
      name_int-bname = it_bkpf-usnam.
      APPEND name_int.
    ENDLOOP.
    SORT name_int BY bname.
    DELETE ADJACENT DUPLICATES FROM name_int.
    LOOP AT it_bkpf.
      READ TABLE name_int WITH KEY
        bname = it_bkpf-usnam
        BINARY SEARCH.
      IF name_int-name_text IS INITIAL.
        SELECT SINGLE name_text
          FROM v_usr_name
          INTO name_int-name_text
          WHERE bname = it_bkpf-usnam.
        MODIFY name_int index sy-tabix.
      ENDIF.
      it_bkpf-username = name_int-name_text.
      MODIFY it_bkpf.
    ENDLOOP.
    Rob

  • Data Load - Data / Table Mapping Columns Not Showing

    Hi,
    Using the new 4.1 functionality I have created a data load wizard.
    Everything seems to have created OK however when i run the wizard and get to the Data / Table Mapping stage (2nd page) the column names lov contains no list of values.
    The table i am trying to load in is in another schema but all the grants are there so that schema can view it.
    Any idea what I need to do or what I have missed so the columns can be viewed.
    Thanks in advance.

    Hi,
    You have to log in as admin and there should be an option to add schemas, once adding it should appear in the lov.
    This link should help.
    Parsing Schema

  • Problem in Loading data for clob column using sql ldr

    Hi,
    I am having problem in loading data for tables having clob column.
    Could anyone help me in correcting the below script for ctrl file inorder to load the data which is in mentioned format.
    Any help really appreciated.
    Table Script
    Create table samp
    no number,
    col1 clob,
    col2 clob
    Ctrl File
    options (skip =1)
    load data
    infile 'c:\1.csv'
    Replace into table samp
    fields terminated by ","
    trailing nullcols
    no,
    col1 Char(100000000) ,
    col2 Char(100000000) enclosed by '"' and '"'
    Data File(1.csv)
    1,asdf,"assasadsdsdsd""sfasdfadf""sdsdsa,ssfsf"
    2,sfjass,"dksadk,kd,ss""dfdfjkdjfdk""sasfjaslaljs"
    Error Encountered
    ORA-01461: can bind a LONG value only for insert into a LONG column
    Table sampThanks in advance

    I can't reproduce it on my 10.2.0.4.0. CTL file:
    load data
    INFILE *
    Replace into table samp
    fields terminated by ","
    trailing nullcols
    no,
    col1 Char(100000000) ,
    col2 Char(100000000) enclosed by '"' and '"'
    BEGINDATA
    1,asdf,"assasadsdsdsd""sfasdfadf""sdsdsa,ssfsf"
    2,sfjass,"dksadk,kd,ss""dfdfjkdjfdk""sasfjaslaljs"Loading:
    SQL> Create table samp
      2  (
      3  no number,
      4  col1 clob,
      5  col2 clob
      6  );
    Table created.
    SQL> host sqlldr scott/tiger control=c:\temp\samp.ctl log=c:\temp\samp.log
    SQL> select * from samp
      2  /
            NO
    COL1
    COL2
             1
    asdf
    assasadsdsdsd"sfasdfadf"sdsdsa,ssfsf
             2
    sfjass
    dksadk,kd,ss"dfdfjkdjfdk"sasfjaslaljs
            NO
    COL1
    COL2
    SQL> SY.

  • 11g bi publisher data model generic columns names for obiee data source?

    I'm just trying to figure out if this is a bug, expected behavior or installation problem. When I select an Oracle BI Analysis to add to the data model diagram the column names are not copied over. Instead they are all renamed as Column0-ColumnNN.
    Thanks
    Edited by: user13087422 on Apr 7, 2011 9:49 AM

    I'm facing this same issue. Can you solve that? What's the problem with it?
    Regards,
    Ariel

Maybe you are looking for

  • Mails sent from Z10 are not getting downloaded using POP 3

    Hi, I have just upgraded from BB 9360 to Z10, all the mails sent from the Z10 are not getting downloaded on PC, I use POP 3 setting to download messages. Mails deleted from Z10 are getting downloaded Please let me know how to download mails sent from

  • Impdp Worker unexpected fatal error KUPW$WORKER.PUT_DDLS

    I`m trying to import IMPDP, dump from (linux oracle 10.02.00.01.00) to oracle 11 and i get : ORA-39126: Worker unexpected fatal error in KUPW$WORKER.PUT_DDLS [TRIGGER:"SKASUJMNIE"."ADD_BS_CM"] ] ORA-06502: PL/SQL: numeric or value error LPX-00225: en

  • Skinning in 11.1.2.2 (horizontal lines issue)

    Hello, I followed Shays on-line tutorial [https://blogs.oracle.com/shay/entry/adf_faces_skin_editor_how] It was very helpful and informative and I defined new colours for all the images using the skinning editor However, I now have the situation depi

  • Thumbnails Loading

    I use Aperture with the library on a networked-harddrive. When opening a project I wait for Aperture to finish loading the thumbnails because the app is very sluggish when it's processing thumbnails. Once the thumbnails are loaded I begin viewing, an

  • ODI Package + Calling via Unix wrapper

    Hi, I am new to ODI... Can you please help me on this. On Overall architecture we are 3 products 1. ODI for staging to target transformaton 2. AbInitio conduct>IT for dependency analyisis and as work flow ( It can call Unix scripts, programs, SQL etc