Text data in to oracle table

Hi Friends,
I have one text file with single column. I want to insert this data in to my database. The number of rows are around 2 million. Please help me. The text file is I am saving in C:\.
Please help me to write any pl/sql code which can read my file and inserts in to that table. I have oracle client installed on my PC.
Thanks in advance.
Bhargava.

I have one text file with single column. I want to
insert this data in to my database. The number of
rows are around 2 million. Please help me. The text
file is I am saving in C:\.
lease help me to write any pl/sql code which can read
my file and inserts in to that table. I have oracle
client installed on my PC.Try SQL*Loader:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/part_ldr.htm
isotope

Similar Messages

  • How to export data from a Oracle table to a delimited file?

    I know how to load delimited file into a table, but how to export
    data from a Oracle table to a delimited file?
    Thanks in advance.

    Try looking at this link, it's long but there's three different solutions discussed in it. If you look at Barbara Boehmer's
    solution in her posts in the link below you'll see that she's addressed your concerns with spool files.
    Re: utl_smtp and triggers

  • Writing a stored procedure to import SQL Server table data into a Oracle table

    Hello,
    As a new DBA I have been tasked with writing a stored procedure to import SQL Server table data into an Oracle table. I have been given many suggestions on how to do it from SQL Server but I I just need to write a stored procedure to run it from the Oracle side. Suggestions/guidance on where to start would be greatly appreciated! Thank you!
    I started to write it based on what I have but I know this is not correct :/
    # Here is the select statement for the data source in SQL Server...
    SELECT COMPANY
    ,CUSTOMER
    ,TRANS_TYPE
    ,INVOICE
    ,TRANS_DATE
    ,STATUS
    ,TRAN_AMT
    ,CREDIT_AMT
    ,APPLD_AMT
    ,ADJ_AMT
    ,TRANS_USER1
    ,PROCESS_LEVEL
    ,DESCRIPTION
    ,DUE_DATE
    ,OUR_DATE
    ,OUR_TIME
    ,PROCESS_FLAG
    ,ERROR_DESCRIPTION
      FROM data_source_table_name
    #It loads data into the table in Oracle....   
    Insert into oracle_destination_table_name (
    COMPANY,
    CUSTOMER,
    TRANS_TYPE,
    INVOICE,
    TRANS_DATE,
    STATUS,
    TRANS_AMT,
    CREDIT_AMT,
    APPLD_AMT,
    ADJ_AMT,
    TRANS_USER1,
    PROCESS_LEVEL,
    DESCRIPTION,
    DUE_DATE,
    OUR_DATE,
    OUR_TIME,
    PROCESS_FLAG,
    ERROR_DESCRIPTION)
    END;

    CREATE TABLE statements would have been better as MS-SQL and Oracle don't have the same data types.
    OUR_DATE, OUR_TIME will (most likely) be ONE column in Oracle.
    DATABASE LINK
    Personally, I'd just load the data over a database link:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_table@mssql_db_link
    As far as creating the database link from Oracle to MS-SQL ... that is for somebody else to answer.
    (most likely you'll need to use an ODBC driver)
    EXTERNAL TABLE
    If the data from MS-SQL is in a CSV file, just use and external table.
    same concept:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_external_table
    MK

  • OBIEE 11g - Combine data from two Oracle tables

    Good day!
    I tried to combine data from two Oracle tables as fact data, but it doesn't work.
    My steps: I created SCOTT.EMP2 table from SCOTT.EMP table, update EMPNO and ENAME values of EMP2 table to distinguish data of my tables. Then I imported physical tables DEPT, EMP and EMP2 to BIEE 11g, created joins DEPT-EMP and DEPT-EMP2 in physical diagram. Then I dragged DEPT and EMP tables to BMM, and EMP2 table to EMP as second LTS. In Content tab for EMP and EMP2 I checked "This source should be combined with other sources at this level" checkboxes. Then I renamed logical tables EMP and DEPT to Employees and Departments and dragged them to Presentation area. In Answers I created Analysis with columns DNAME and ENAME.
    The problem is that data on results tab is only from one physical table EMP or EMP2 (depending on the order of sources EMP and EMP2 of LT Employees) and not from both.
    Can anybody help? Am I missed something?
    Al.

    Hi Al,
    I think you have to define the content of the LTS.
    http://download.oracle.com/docs/cd/E12096_01/books/admintool/admintool_BusModSetup16.html
    You have to specify the content of the different fragments.
    http://download.oracle.com/docs/cd/E12096_01/books/admintool/admintool_SetUpAggNav3.html#wp1005333
    Maybe you have to add an additional column 'Source' ('EMP1', 'EMP2')
    Good Luck,
    Daan Bakboord
    http://obibb.wordpress.com

  • Mainframe data loaded into Oracle tables - Test for low values using PL/SQL

    Mainframe legacy data has been copied straight from the legacy tables into mirrored tables in Oracle. Some columns from the mainframe data had 'low values' in them. These columns were defined on the Oracle tables as varchar2 types. In looking at the data, some of these columns appear to have data that looks like little square boxes, not sure but maybe that is the way Oracle interprets the 'low values' in the original data into varchar. When I run a select to find all rows where this column is not null, it selects these columns. In the results of the select statement, the columns appear to be blank, however, in looking at the data in the column using SQL Developer, I can see the odd 'square boxes'. My guess is that the select statement is detecting that something exists in this column. Long story short, some how I am going to have to test this legacy data on the Oracle table using Pl/Sql to test for 'low values'. Does anyone have any suggestions on how I could do this????? Help! The mainframe data we are loading into these tables is loaded with columns with low values.
    I am using Oracle 11i.
    Thanks
    Edited by: ncsthbell on Nov 2, 2009 8:38 AM

    ncsthbell wrote:
    Mainframe legacy data has been copied straight from the legacy tables into mirrored tables in Oracle. Not a wise thing to do. Mainframe operating systems typically use EBCDIC and Unix and Windows servers use ASCII. The endian is also different (big endian vs little endian).
    Does anyone have any suggestions on how I could do this????? As suggested, use the SQL function called DUMP() to see the actual contents (in hex) of these columns.

  • Data Load to Oracle Tables.

    Dear User,
    I have a requirement where I need to create a new Apex application that will allow the Planning department to create Item Lists and Locations lists. They will build the lists based on values (location or Item) that they paste from their Spreadsheets into the Apex App.
    Location list will be in the below Format.
    "02-05-07-14-15-19-20-21-23-25-27-28-44-47-53-54-61-63-65-66-68-69-74-75-77-79-81-85-86-87-89-90-92-95-96-97-98-99-101-103-105-107-111-112-116-119-120-127-130-133-139-143-147"
    And Item List will be in the below Format.
    7310468
    1009521
    4490033
    4490156
    4490318
    4490334
    4490059
    4490083
    I need to load the Location List Data and Item_list Data into two different tables "Loc_List_stage" and "Item_list_stage". Every Location should be on a different line and same with the Item List.
    Any Help or suggestion will be appreciated.
    Thanks!
    NS

    Hi,
    Go to: SQL Workshop -> Utilities -> Data Workshop
    In the Data Load section choose: Text Data
    Load To : Existing table
    Load From: Copy and paste
    Next choose the schema in which your table is present in which you want to load data
    and then select the table name.
    Then copy and paste the data to be uploaded and then can upload the data.
    See if it works!
    Regards,
    Kiran

  • Intervals, synchronize the data between two oracle tables located in diffe

    Hi Experts,
    Is there any way I can, at set intervals, synchronize the data between two oracle tables located in different servers? What is the software, if there is any? If there are steps I can follow, so much the better.
    Thanks!

    I'm not sure what you want to achieve here...
    I want to synchronize both the Servers , so that it can update HO servers as well as Factory Server with the complete data. Could you please elaborate a little bit more; basing on your description I could also tell you how to setup timesync for those two servers if I understand "complete data" as the current date and time...
    Also a lot of solutions are platform and version specific so it would help if you could indicate OS and Database Versions (4 digit).
    And I still fail to see what this has to do with forms. You might want to post your question to the Database General forum: General Database Discussions
    cheers

  • Master data Load from Oracle table

    Hi,
    My master data comes from an Oracle table. The table has both attributes and texts combined. How do I load the Master data into the text and attribute info objects thru Direct Upload of Master Data?
    Is it necessary to go in for Flexible Upload in this case?
    Regards

    Hi,
    you can create two views on the table. One for the text and the other one for the attributes. Create your datasources on these views and assign them to your infoobject.
    regards
    Siggi

  • Bulk text data insertion in Partitioned Table

    Hi All,
    I want to insert more than 200 crore records from 5 text data files in a single table say TAB1 (PARTITIONED table with RANGE type).
    Currently I am using EXTERNAL TABLE concept and providing 5 filenames (of total 45 crore records) at a time to external table definition access criteria LOCATION() with COMMA ",".
    After that using following sql statement:
    INSERT /*+ APPEND PARALLEL(6) */ INTO TAB1 SELECT * FROM TAB1_EXT;
    Presently The execution time statistics for 45 crore records is as follows:
    1)     With /*+ PARALLEL(6) */ hint, execution time : 81 Mins     
    2)     with /*+ APPEND PARALLEL */ hint, execution time : 73 Mins     
    3)     With cursor loop; bulk collect and FORALL with interval of 1000000 records, execution time : 98 Mins
    Earlier the execution time was too much but after changing and trying with variation in SQL logic, DB parameter, and H/w, now it is somewhat good.
    Now INDEXES are also removed from table. NOLOGGING is purposely not using as it will not be considerable at PROD environment.
    Also Database is not in ARCHIVE mode now.
    I also tried with change in DB parameters like SGA_MAX_SIZE which is now 16GB. I am thinking even to change DB_BLOCK_SIZE value from 8K to 32K.
    O/S: LINUX
    ORACLE DB: ORACLE 11g
    RAM: 256 GB
    48 CPU CORES, AMD Opteron (HP DL 585 Model)
    If you have any suggestion, please pass it to me.

    Instead of disturbing parallel coordinators you could just submit n jobs each doing a simple <b>insert into big_table select * from external_table_n</b> or something similar - all external_tables_i having the same structure just different location parameters.
    Regards
    Etbin
    Edited by: Etbin on 26.2.2011 12:25
    possibly grouping text data files according to partitions the data would end within

  • How to read a CSV file and Insert data into an Oracle Table

    Hi All,
    I have a Clob file as a in parameter in my PROC. . File is comma separated.need procedure that would parse this CLOB variable and populate in oracle table .
    Please let me some suggestions on this.
    Thanks,
    Chandra R

    jeneesh wrote:
    And, please don't "hijack" 5 year old thread..Better start a new one..I've just split it off to a thread of it's own. ;)
    @OP,
    I have a Clob file as a in parameter in my PROC. . File is comma separated.need procedure that would parse this CLOB variable and populate in oracle table .You don't have a "clob file" as there's no such thing. CLOB is a datatype for storing large character based objects. A file is something on the operating system's filesystem.
    So, why have you stored comma seperated data in a CLOB?
    Where did this data come from? If it came from a file, why didn't you use SQL*Loader or, even better, External Tables to read and parse the data into structured format when populating the database with it?
    If you really do have to parse a CLOB of data to pull out the comma seperated values, then you're going to have to write something yourself to do that, reading "lines" by looking for the newline character(s), and then breaking up the "lines" into the component data by looking for commas within it, using normal string functions such as INSTR and SUBSTR or, if necessary, REGEXP_INSTR and REGEXP_SUBSTR. If you have string data that contains commas but uses double quotes around the string, then you'll also have the added complexity of ignoring commas within such string data.
    Like I say... it's much easier with SQL*Loader of External Tables as these are designed to parse such CSV type data.

  • I want to update date field in oracle table using database adaptor

    Hi Guys,
    I want to update date in oracle table field which is 'DATE' type , but i am getting following error.
    Pure SQL Exception.
    Pure SQL Execute of update crp3apps.IFACE_SO_DATE_CHANGES set PROCESSED_DATE=? where CTRL_ID=? failed. Caused by java.sql.SQLException: ORA-01830: date format picture ends before converting entire input string
    The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead.
    </summary>
    </part>
    - <part name="detail">
    <detail>
    ORA-01830: date format picture ends before converting entire input string
    </detail>
    i am formated the date using following code and assigned to one variable.
    ora:formatDate(ora:getCurrentDateTime(),'dd-MMM-yyyy hh:mm:ss ')
    this is update query
    update crp3apps.IFACE_SO_DATE_CHANGES set PROCESSED_DATE=#date where CTRL_ID=#id
    Please provide solution.
    regards
    janardhan

    The thing is that XSLT often doesn't deliver the functionality required when it comes to times.
    You suggest appening "Z" to the time but this means that the time is now in UTC time. What if the system from where the date is being converted is running in NZ using local time? Other systems that recieve the date (and correctly handle the time zone) will now have a time that is out by a number of hours.
    You often can't ignore the time zone (drop the 'Z') as if you send the time to a system it has to either assume the time is local to it (which may not be the case... the other system coudl be in a different time zone) or assume the time is UTC (I think crossfire does this by default).
    Typically can't just append a time zone (e.g. +11:00) either as many places have daylight savings so the value to appended is variable (you then need some way of determining what the value is... either Java Embedding or a Service).
    As you mention it does depend on the use case but in many circumstances using Jaba Embedding, not as suggested above but with the appropriate Java.util.Calendar classes, is the best way to handle date and time in BPEL. Even still you need to ascertain the format of times external to the system and ensure you parse them correctly.
    ANd even if you do all this you can still run into problems. I've seen a real world example where two systems which both handled time zones correctly and had previously been working together for quite a while, satrted reporting different times. It turns out that only one of them had had the most recent Java Time Zone patches applied and there had been a change in the dates for daylight savings here (Australia). Be warned!

  • How to read RMAN data into an ORACLE Table?

    Hallo,
    With regards to RMAN, how should we store the data into a database table, from the commands which can run only on RMAN prompt without using Recovery Catalog?
    For Example:
    RMAN> Report need backup days 3;
    RMAN DATA:
    RMAN-03022: compiling command: report
    Report of files whose recovery needs more than 3 days of archived logs
    File Days Name
    1 1203 D:\ORACLE\ORADATA\TEST\SYSTEM01.DBF
    2 1203 D:\ORACLE\ORADATA\TEST\RBS01.DBF
    3 1203 D:\ORACLE\ORADATA\TEST\USERS01.DBF
    Should it done via UTL_FILE?
    If so, could someone give simple example/code how to do that, in order to write this RMAN data into an Oracle Database table?
    I also set the utl_file_dir parameter to a particular directory in my database.
    Thanks
    W.Benvort

    Actually, I am not using Recovery Catalog, so the views like RC_database, Rc_tablespaces etc , which are specific to recovery catalog are not available.
    r.- this make sense at 100% because those views belong to the recovery catalog.
    So, I wanted that these information, which we can get via using the commands like above, transfer into an Oracle table
    r.- If you want to access the views of the Recovery Catalog to store part of that information in tables you have to have the database registered in a Recovery Catalog.
    Should we keep the Recovery Catalog in Control file? Instead of using separate Schema.
    r.- I recommend you to create a catalog for your database because the space the controlfile to store information regarding RMAN is reused and you can lose important information about your backups.
    Can we run Catrman.sql script as a sys in order to keep the recovery catalog in sys schema?
    r.- As you know, this is not recommended at all.
    Conclusion : Create a Recovery Catalog and you will be able to perform all that you want regardind what you mentioned above.
    I have a thread for this:
    RMAN ( CATALOG CREATION ) STEP BY STEP by Joel Pérez
    Joel Pérez
    http://otn.oracle.com/experts

  • Data Export to Oracle table from essbase issue

    Hello,
    i am using a data export calc script to load data from essbase into an oracle table. We have Essbase 11.1.2.1 on windows 2008 64 bit R2 server. I have an ODBC system DSN created for this job.
    However, when i launch this process i get a message in the log "Cannot read SQL driver name for [Backup Exec Catalogs] from [ODBC.INI]"
    i have checked the ODBC.ini file also in C:\Windows directory and that file contains the connection entries...
    Any thoughts as to why i am getting this error in one server whereas the same process on SIT server is working fine.
    thanks...

    please restart the application and try again . Check the application log if any details are there

  • Need help loading data from Excel data file to oracle tables

    i need to load an Excel spreadsheet to Oracle table.
    The spreadsheet contains 20 columns, the first 8 columns contains basic info, but the rest 12 columns contains info like
    1stQtr_08, 2ndQtr_08, 3rdQtr_08, 4thQtr_08
    1stQtr_09, 2ndQtr_09, 3rdQtr_09, 4thQtr_09
    1stQtr_10, 2ndQtr_10, 3rdQtr_10, 4thQtr_10
    So what i need to accomplish is:
    break that one record(with 20 fields) in Excel to 3 records for each fiscal year in the Oracle table, so each record in the database table will look like
    8 basic field + fiscal_year + 1stQtr_08, 2ndQtr_08, 3rdQtr_08, 4thQtr_08
    8 basic field + fiscal_year + 1stQtr_09, 2ndQtr_09, 3rdQtr_09, 4thQtr_09
    8 basic field + fiscal_year + 1stQtr_10, 2ndQtr_10, 3rdQtr_10, 4thQtr_10
    There are about 10000 rows in the data file, so how can i use sqlldr to perform such task? beside sqlldr, any other good suggestions?
    thx

    External Tables is just an Oracle API for sqlloader. If you going to load this data over and over again, External tables would be a good idea, but if it's a one time thing, sqlldir is simpler, unless you just want to learn how to use External Tables.
    I used to run a data warehouse, so I have done, at least similar, to what you are doing in the past.

  • How to use DS's text processing to parsel the text data stored in DB table?

    I want to use DS's text processing to parse the text data stored in a database table, but all the demo I see is parsing text from a flat file. I tried with the blueprint  sample and edit the input from a flat file to database table, but can not map the column with the base entityExtraction. anyone can give me a guide or example? thanks so much!
    regards,
    Bin

    Still looking for some ansewers. Can any one help me?

Maybe you are looking for

  • How to create a report with selection screen that can run in background

    Sorry to ask these basic questions but I am knew to ABAP Programming. To keep it simply, I am attempting to create a report that has a simple parameter driven selections screen with one field.  That field takes in a folder path from the user.  The us

  • When will I get my pre-ordered Verizon iPhone 5?

    I was the FIRST person to pre-order a black 64G at BestBuy. Does this guarantee that I'll receive it on the 21st?

  • Change this code to retrieve more than one row in the drop out menu

    How I can change this code, it only works when the cursor retrieves one row like this 201410 Fall 2013 If it returns 2 rows, I only get the fir one in the drop out menu  201410 Fall 2013 201420 Spring 2014 I try to put a loop but it does not work.. I

  • Setting order of connectivity between devices for Internet?

    I have my macbook pro setup wth Access to internet via the airport AND also setup to use DUN via bluetooth. I would like it to only goto the DUN if the airport is not availiable. Right now, I get the message that it con not connect to the device... t

  • Iris Pro and FCP X

    Hey I've read the System Requirements for FCP including the listing of Open CL compatible "cards." Should I infer that integrated graphics are simply unacceptable, or can FCP X be successfully used on a 2013 iMac with Iris Pro? Would love to hear fro