Loading file nto table

hi all,
i have a text file or a document or some other file somwhere in my hard disk and i want to insert that into my table ........... i want this to be done by hardcoding the file into table using an sql query or an insert statement .......... i alreay have a table with a column of type blob .........i have a file browse item in my form and i select the file thru this one......... i want to manually insert the file selected using aan query or insert statement or a procedure ........can anyone help me .........
i used some FILETOBLOB function but sql was not able to identify that function ...... it was giving "invalid identifier error" ..... this was the easiest solution i found but it wasnt working
Edited by: the_reckoner on Oct 20, 2009 1:01 AM

Hi,
Have you check Document library app ?
http://www.oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html#DOC_LIB
And also sample application that comes with Apex may help you. Check page 6.
Br, Jari

Similar Messages

  • Advise about loading File into table in Oracle 8i

    Hello there, i need help about something i need to do and i dont know if exist a way in Oracle 8i to do it.
    My problem is:
    I have a File that has records like:
    <code>
    data1a|data1b|data1c|data1d
    data2a|data2b|data2c|data2d
    data3a|data3b|data3c|data3d
    dataNa|datanNb|dataNc|dataNd
    </code>
    The data in this file i need to put into a table with 4 columns like
    <code>
    create table DataFromFile(
    columnA String,
    coumnB String,
    columnC String,
    columnD String
    </code>
    Exist a way to do this like calling an Stored Procedure and give as input the FILE? or that a JOB can LOAD the file and insert data into the table?
    I am not allowed to load the file with Java (in example) and parse it and then insert records... i need to do it by the DB Oracle 8i directly or by a java program that pass the file.
    Thanx for any advise u can give me :D

    thanx so much to both for answer in my question... im gonna study about yours tips
    i actually use JEE in a Weblogic 10.2 server and i need to take a file and load its data into an oracle 8i table but im not allowed to make inserts for every record in the file :(
    if u have more suggestions i will study too :) its good to learn other alternatives to solve this issue :)
    thanx again

  • STARTED IT, BUT STILL NEED HELP -- INPUTTTING CHARACTERS FROM LOADED FILE INTO TABLE, SELECTING STRINGS FROM TABLE AND PLACING IN NEW TABLE, SAVING NEW TABLE TO SPREADSHEET FILE

    I AM TRYING TO IMPORT CHARACTERS FROM A TAB DELIMITED FILE INTO A TABLE ON LABVIEW.  ONCE THE DATA IS IN THE TABLE I WANT TO BE ABLE TO SELECT INDIVIDUAL STRINGS FROM THE TABLE AND PLACE IT IN A NEW TABLE.  WHEN I CLICK ON A STRING I WOULD LIKE THE SELECTED STRING TO SHOW IN A TEXT BOX LABELED 'SELECTED STEP'  AFTER ALL THE SELECTED STRINGS IS IN THE TABLE I WOULD LIKE TO SAVE THE NEW TABLE AS ANOTHER SPREADSHEET -- TAB DELIMITED -- FILE, MAKING IT ACCESSIBLE TO OPEN.  HERE IS WHAT I HAVE SO FAR.  I CAN INPUT DATA INTO THE TABLE, BUT I CAN ONLY TRANSFER ONE STRING INTO THE TABLE I WOULD LIKE TO BE TO INPUT MULTIPLE STRINGS.    ALSO WHENEVER I TRY SAVING THE FILE, IT ALWAYS SAVES A UNKNOWN FILE, HOW CAN I GET IT TO SAVE AS A SPREADSHEET FILE.  THANKING ALL OF YOU IN ADVANCE FOR YOUR HELP!!!!!!
    Attachments:
    Selector.zip ‏30 KB

    Pondered,
       The question you are asking is the same one that you asked in: http://forums.ni.com/ni/board/message?board.id=170&message.id=132508#M132508, to which I supplied a revised version of the original vi you used (which was modified from the original one I supplied to an earlier thread). A couple of questions: 1) What does my latest not do that is in your question, 2) Why are you starting yet another thread about the same problem?  We are here trying to help, it makes it a lot easier if you keep the same problem in the same thread, it reduces duplication of effort from those that might not have been following the previous thread(s).  Those of us that don't have our "names in blue" are just doing this "for fun" (the blue names are NI employees, who may still be doing it "for fun"), and it makes it more fun if it doesn't seem (correctly or not) that our attempts are ignored.  If an answer doesn't help, or seems incomplete, post a little more detail to the same thread so that the original respondent, or someone new, can provide more information, or understand your problem better.
    P.M.
    Message Edited by LV_Pro on 07-20-2005 01:20 PM
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Data loading issue in Table

    Hi Friends,
    I am using ODI 11g.
    I am doing a Flat file to Table mapping .I have 10 records in flat file while loading the data in Oracle table ,i can see only 1 record is loaded.
    I am using IKM SQL control append and using distinct option.
    Can you plz let me know where exactly the problem.
    Thanks,
    Lony

    Hi Lony,
    Please let us know other KM using in your ODI interface.
    please check in flat file, PK column have same value or it idifferent ?
    Please check if header is present in your flat file.
    when you load file as table in model > right click on the table (flat file adding as table in model) and click on view data and see all 10 records are you able to see in ODI level
    Regards,
    Phanikanth

  • How can I make an easy *.CSV file to load into database table

    Hi All,
    I have a huge excel sheet having columns item#, description and qty. The description column sometimes maybe one word name, two word name separated with space or may be , spearated name. I want to write and PL/SQl code which will read this file and load it into database table. Now the *.CSV file is either comma delimited or tab text delmited which both do not solve my issue. Is there any better solution with anyone which can prevent the manual editing to the *.CSV file and I can easily load it to table.
    Your help is appreciated,
    Thanks
    Zahir

    SQL*Loader is probably the fastest method, but since you specifically asked for a PL/SQL method:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:464420312302

  • How  to load the data from excel  file  into table in oracle using UTL_FI

    How to load the data from excel file into table in oracle
    and from table to excel file
    using UTL_FILE package
    Please give me some example

    This is something i tried in oracle apex
    http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
    Regards,
    CKLP

  • Getting error while loading flat file into table.

    I am using ODI 11 and i am trying to load data in oracle database table using source as flat .txt file .
    When i execute the interface , i am getting below errors.
    ODI-1217: Session INF_FILE2TAB (31022) fails with return code 7000.
    ODI-1226: Step INF_FILE2TAB fails after 1 attempt(s).
    ODI-1240: Flow INF_FILE2TAB fails while performing a Loading operation. This flow loads target table PARTNER.
    Caused By: org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File "<string>", line 44, in <module>
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
         at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1074)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
         at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:2224)
         at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:2168)
         at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:333)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
    java.sql.SQLException: java.sql.SQLException: ORA-06564: object DAT_DIR does not exist
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:346)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2458)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:540)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
         at java.lang.Thread.run(Thread.java:662)
    Please let me know pointers on this.

    Yes,after your sugestion i have created ODI agent and tested the file system connection in topology. It was connected successfully.
    but when i tried again for file to table load. Again got below error.
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File "<string>", line 44, in <module>
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
         at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1074)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
         at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:2224)
         at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:2168)
         at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:333)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
    java.sql.SQLException: java.sql.SQLException: ORA-06564: object DAT_DIR does not exist
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:346)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2458)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:540)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
         at java.lang.Thread.run(Thread.java:662)
    Please suggest.

  • How can i load Client side XML file to Table

    Hi,
    How can i load the all the XML files (near 10,000 files) available in client machine to the XML table .
    I did try with directrory list in the Webutility demo form, but when the number of file is near to 1,500 its giving error.
    Please suggest the best method to implement my requirements.
    1. XML fies are in a folder in end users machine(Windows OS)
    2. I need to load all the XML files to table (Oracle Database is in Unix)
    I am using forms 10g
    Thanks in advance.
    Rizly

    Hi,
    What is the error you are getting when you reach 1,500 records? Can you post it? You mentioned you are using the webutil to load them. How you are loading? From the client machine you are loading to the database directly? Can you post the code you are using for that?
    -Arun

  • Loading File name and file contents into two separate tables using Sqlloadr

    Hi All,
    I have situtation like to load File contents into One table and File name into one table . File comes with .txt extension
    Example :
    File name : product_09_abc.txt
    File contents :
    Productcode
    ABC
    CDE
    EFT
    Can you please help me out this how can we acheive this using SQLLOADER.

    SQL*Loader will not pass through the filename for you to be able to insert into a table.
    You will need to have a controlling o/s script that picks up the file name, calls sql*loader and then also call's an SQL script (using sql*plus?) to insert the filename into a.n.other table.

  • How load File as Blob in Oracle Table?

    Hi, I am beginner in ODI.
    How load File as BLOB in Oracle Table?

    Ah so nice, a FAQ, by someone who can't use online resources!
    Any explanation why Google is broken for you?
    Here is the code I use to load a jpg.
    procedure upd_portrait(p_person_id in number, p_file_name in varchar2) is
    l_blob blob;
    l_bfile bfile;
    begin
    update person
    set portrait = empty_blob()
    where id = p_person_id
    returning portrait into l_blob;
    l_bfile := bfilename('MY_IMAGES', p_file_name);
    dbms_lob.fileopen(l_bfile);
    dbms_lob.loadfromfile(l_blob, l_bfile, dbms_lob.getlength(l_bfile));
    dbms_lob.fileclose(l_bfile);
    end;
    Sybrand Bakker
    Senior Oracle DBA

  • Best way to load data in table from combination of Table and flat file?

    Hi All,
    Could you please share your thoughts on best way of achieving this objective -
    Flat File - 15 Million records (Field A,B,C)
    Table A - 15 Million records ( Field A,D)
    Objective -
    Load Field A,B,C,D in Table B from Flat file and Table A.
    Data can be loaded from flat file in Table B then updated from Table A but this update operation is taking lot of time. (Intermediate Commit, Bulk operations already tried)
    Regards,
    Dark Knight

    Environment -
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Tables are analyzed.
    Indexes are their.
    Update statement using the index.
    Data is close to 200 MB.
    I am interested in knowing if there are alternate ways of doing this, other than conventional way of loading data then updating it.

  • Loading  a database table from a UNIX file

    hi,
    Need A program to load a database table from a UNIX file
    thnks.

    HI,
    report zmjud001 no standard page heading.
    tables: z_mver.
    parameters: test(60) lower case default '/dir/judit.txt'.
    data: begin of unix_intab occurs 100,
    field(53),
    end of unix_intab.
    data: msg(60).
    ***open the unix file
    open dataset test for input in text mode message msg.
    if sy-subrc <> 0.
    write: / msg.
    exit.
    endif.
    ***load the unix file into an internal table
    do.
    read dataset test into unix_intab.
    if sy-subrc ne 0.
    exit.
    else.
    append unix_intab.
    endif.
    enddo.
    close dataset test.
    ***to process the data. load the database table
    loop at unix_intab.
    z_mver-mandt = sy-mandt.
    z_mver-matnr = unix_intab-field(10).
    translate z_mver-matnr to upper case.
    z_mver-werks = unix_intab-field+10(4).
    translate z_mver-werks to upper case.
    z_mver-gjahr = sy-datum(4).
    z_mver-perkz = 'M'.
    z_mver-mgv01 = unix_intab-field+14(13).
    z_mver-mgv02 = unix_intab-field+27(13).
    z_mver-mgv03 = unix_intab-field+40(13).
    to check the data on the screen (this is just for checking purpose)
    write: / z_mver-mandt, z_mver-matnr, z_mver-werks, z_mver-gjahr,
    z_mver-perkz, z_mver-mgv01,
    z_mver-mgv02, z_mver-mgv03.
    insert z_mver client specified.
    *if the data already had been in table z_mver then sy-subrc will not be
    *equal with zero. (this can be *interesting for you - (this list is
    *not necessary but it maybe useful for you)
    if sy-subrc ne 0.
    write:/ z_mver-matnr, z_mver-werks.
    endif.
    endloop.
    1. This solution is recommended only if the database table is NOT a standard SAP database table .
    Cheers,
    Chandra Sekhar.

  • How I can Load Data in Excel File On Table in Pl/SQL

    Dear All
    I have Excel File and I need To Load Data on Table Using PL/SQL.
    How I Can It.
    Thanks In advance.

    user8942603 wrote:
    load data
    infile 'C:\Documents and Settings\pc computer\Desktop\calling code.csv'
    into table MSR_CALLING_CODE
    fields terminated by "," optionally enclosed by '"'
    ( code,COUNTRY )
    When Use this Code the error Occurred
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    what the problemThat's because you have to set up SQL*Loader with a a control file and then run the sqlldr command from the command line. It's not an SQL command.
    If your file is CSV you would be better using external tables instead, although that means that your data will have to be on the database server first.
    If the file is located on your local computer then you would have to use SQL Loader.

  • Loading data from a XML file to table

    Hi,
    i am using OWB 10g R2.i have to load one XML file to table.
    Can anyone help me in this regard.
    Thanks,
    Priya

    Hi Priya
    There is a post on leveraging XDB with some interesting details;
    http://blogs.oracle.com/warehousebuilder/2007/09/leveraging_xdb.html
    Cheers
    David

  • Loading data from flat file to table

    Hi,
    I am using OWB 10g R2. I have to develop a map which loads data from flat file to table.
    1. I have created a .csv file.
    2. Import that into OWB by Module Wizard.
    3. I have created one external table, which use the .csv file.
    After that what I have to do for successfully loading the data into table.
    Regards,
    Sanjoy

    Hi Sanjoy
    You can building a mapping to move the data from somewhere to somewhere else. More specifically;
    1. create a mapping
    2. add external table to mapping
    3. add table to mapping for target (it can be unbound)
    4. map from external table ingroup to target table ingroup (all columns will be mapped)
    5. if target table was unbound right click on target table and click create and bind
    This is a basic mapping you can have for this scenario. There is a post here which does something like this, but it will create a File to Table mapping which will use SQLLoader.
    http://blogs.oracle.com/warehousebuilder/2009/01/expert_useful_scripts_from_simple_primitives.html
    Cheers
    David

Maybe you are looking for

  • Error while starting ABAP trial version system

    Hello Friends,          I am getting the following error while starting thesystem.Please help me in solving the problem. I have seen this problem has happened for many people. Points rewarded for helpfull answers. error for dev_disp: kernel runs with

  • Subcontracting Scenario in PM

    Hi PM Expert, Can u tell me If I want to do Maintenance of my Machine Assembly from Outside and I also need to send the Material required for that Servicing   Please Explain Scenario that MAP in PM and also Hw to send material towards Vendor and Hw T

  • How to develop a virtualisation software

    Hello Guys, I have made my own linux distro. I want it only as a virtualization format, I have the OVF VM and the VMWare machine. But i only want it for mac. But if I start distributing the VMWare image or the OVF Vm, windows geeks can easily install

  • PSE 11 People & Face tags & Metadata

    Hi All, I'm using PSE 11 and have imported some photos that were being used in Photo Gallery.  My problem is the People/Face tags done in Photo Gallery are not recognised by PSE at all.  It detected all other tags OK and imported them but not the Peo

  • Could not build an executable in LV7.1.1

    Hello, I have shifted my project from LV6.1 to LV7.1.1. Since them I can not compile an executable. The error is "Error 1003 occurred at [my-path] Possible reason(s): LabVIEW: The VI is not executable." My application works in a development-environme