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.

Similar Messages

  • NEED HELP - - Inputting data files into a table, Selecting from previous to put in new table, Saving new table

    I am trying to import data characters from a tab delimited file into a table in labview.  After I import the strings, I want to be able to select individual strings from the table and put into another table.  I want the item that I am selecting to appear in a text box labeled 'selected step'.  After I put all of the selected data in the new table, I want to be able to save that table in another tab delimited file (spreadsheet).  This is what I have so far.  Any help given will be GREATLY appreciated. 
    Attachments:
    Selector.zip ‏30 KB

    Hi,
         Here are modifications to your vi to do what you are describing. It helps, when trying to work through issues like these on this forum to not start a new thread with each iteration of your question. Those of us that are trying to help can follow it better if you just "Reply" to your previous thread with the new, related question. If the question is for a totally new issue then a new thread is best, but when you are working through the details of essentially the same problem it really helps us follow it if you stay in one thread, and that usually means faster answers.
    We also like it if, when an answer helps, you give us a rating (the more stars the better) as it is about all we get out of it!
    P.M.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion
    Attachments:
    SelectorV2.zip ‏30 KB

  • How do I import the data from Excel (.xls) file into Oracle Database table

    I have an excel file with 5 columns of 5000 rows.
    I have to import 5000 rows of data into my oracle table with
    same column names & Data types.
    What is the best advise for this ?
    Thanks.
    Srini

    You can connect to Oracle from Excel directly. I know you can read data but am not sure if you can export data.
    Other option is to import the data into Access.
    Create an ODBC connection for Oracle
    Use the to connect to Oracle from Access
    Export data to Oracle from Access
    Shakti
    http://www.impact-sol.com
    Developers of Guggi Oracle - Tool for DBAs and Developers

  • NEED HELP with *.dat files.

    How can I create a *.dat file with text in it?
    And then how can I read what is in it?
    This is kind a urgent so I would appreciate any help..
    Thanx in advance...

    I'm sure there will be others with more knowledge of such things...
    ...but one way would be to use RandomAccessReadWriter()
    HTH
    Poot

  • Need help with date range searches for Table Sources in SES

    Hi all,
    I need help, please. I am trying to satisfy a Level 1 client requirement for the ability to search for records in crawled table sources by a date and/or date range. I have performed the following steps, and did not get accurate results from Advanced searching for date. Please help me understand what I am doing wrong, and/or if there is a way to define a date search attribute without creating a LOV for a date column. (My tables have 500,00 rows.)
    I am using SES 10.1.8.3 on Windows 32.
    My Oracle 10g Spatial Table is called REPORTS and this table has the following columns:
    TRACKNUM Varchar2
    TITLE Varchar2
    SUMMARY CLOB
    SYMBOLCODE Varchar2
    Timestamp Date
    OBSDATE Date
    GEOM SDO_GEOMETRY
    I set up the REPORTS table source in SES, using TRACKNUM as the Primary Key (unique and not null), and SUMMARY as the CONTENT Column. In the Table Column Mappings I defined TITLE as String and TITLE.
    Under Global Settings > Search Attributes I defined a new Search Attribute (type Date) called DATE OCCURRED (DD-MON-YY).
    Went back to REPORTS source previously defined and added a new Table Column Mapping - mapping OBSDATE to the newly defined DATE OCCURRED (DD-MON-YY) search attribute.
    I then modified the Schedule for the REPORTS source Crawler Policy to “Process All Documents”.
    Schedule crawls and indexes entire REPORTS table.
    In SES Advanced Search page, I enter my search keyword, select Specific Source Group as REPORTS, select All Match, and used the pick list to select the DATE OCCURRED (DD-MON-YY) Attribute Name, operator of Greater than equal, and entered the Value 01-JAN-07. Then the second attribute name of DATE_OCCURRED (DD-MON-YY), less than equals, 10-JAN-07.
    Search results gave me 38,000 documents, and the first 25 I looked at had dates NOT within the 01-JAN-07 / 10-JAN-07 range. (e.g. OBSDATE= 10-MAR-07, 22-SEP-07, 02-FEB-08, etc.)
    And, none of the results I opened had ANY dates within the SUMMARY CLOB…in case that’s what was being found in the search.
    Can someone help me figure out how to allow my client to search for specific dated records in a db table using a single column for the date? This is a major requirement and they are anxiously awaiting my solution.
    Thanks very much, in advance….

    raford,
    Thanks very much for your reply. However, from what I've read in the SES Admin Document is that (I think) the date format DD/MM/YYYY pertains only to searches on "file system" sources (e.g. Word, Excel, Powerpoint, PDF, etc.). We have 3 file system sources among our 25 total sources. The remaining 22 sources are all TABLE or DATABASE sources. The DBA here has done a great job getting the data standardized using the typical/default Oracle DATE type format in our TABLE sources (DD-MON-YY). Our tables have anywhere from 1500 rows to 2 million rows.
    I tested your theory that the dates we are entering are being changed to Strings behind the scenes and on the Advanced Page, searched for results using OBSDATE equals 01/02/2007 in an attempt to find data that I know for certain to be in the mapped OBSDATE table column as 01-FEB-07. My result set contained data that had an OBSDATE of 03-MAR-07 and none containing 01-FEB-07.
    Here is the big issue...in order for my client to fulfill his primary mission, one of the top 5 requirements is that he/she be able to find specific table rows that are contain a specific date or range of dates.
    thanks very much!

  • I need help for reading from a .txt file.

    My goal in this program is to display the data from the text file to the command prompt. Everything compiles, but its doesnt display the data.
    It probably has to do with my constructer. So help with revising the constructing would be appreciated. I am new to programming by the way.
    import java.util.*;
    import java.io.*;
         class Inventory
         public static void main(String[] args)
              final int MAX = 50;
              InventoryItem[] items = new InventoryItem[MAX];
              StringTokenizer tokenizer;
              String line;
              String name;
              String file = " inventory.txt ";
              int units = 0;
              int count = 0;
              float price;
              try
                   FileReader fr = new FileReader ("inventory.txt");
                   BufferedReader inFile = new BufferedReader(fr);
                   line = inFile.readLine();
                   while (line !=null)
                        tokenizer = new StringTokenizer (line);
                        name = tokenizer.nextToken();
                        try
                             units = Integer.parseInt(tokenizer.nextToken());
                             price = Float.parseFloat(tokenizer.nextToken());
                             items[count++] = new InventoryItem(name, units, price);
                        catch (NumberFormatException exception)
                             System.out.println("error in input.Line ignored:");
                             System.out.println(line);
                        line = inFile.readLine();
                   inFile.close();
                   for (int i = 0; i<count; i++)
                        System.out.println (items);
              catch (IOException exception)
                   System.out.println("The file " + file + "was not found.");
         } //end of main method
    }// end of Inventory class
    public class InventoryItem
         private String name;
         private int units;
         private float price;
         public InventoryItem (String nameOfItem, int numOfUnits, float priceOfItem)
              name = nameOfItem;
              units = numOfUnits;
              price = priceOfItem;

    Use CODE tags
    What's not printing?
                        try
    units =
    its = Integer.parseInt(tokenizer.nextToken());
    price =
    ice = Float.parseFloat(tokenizer.nextToken());
    items[count++] = new InventoryItem(name, units,
    nits, price);
                        catch (NumberFormatException exception)
    System.out.println("error in input.Line <========= THIS ???????
    .Line ignored:");
                             System.out.println(line); <============= AND THIS???
                        line = inFile.readLine();
                   inFile.close();
                   for (int i = 0; i<count; i++)
                        System.out.println (items); <========== THIS IS OK, right?
    If I have correctly indentified your problem, then the reason it's not printing is that your print statements are within a catch block, and evidently your code is not throwing any NumberFormatExceptions

  • [noob needs help] Loading image from a URL

    Hey everyone. I'm new here. And I'm new at J2ME as well.
    I have a simple school project and I have doubts about it. I've searched everywhere on the net yet I could not find the solution. Anyways, I do understand the concept of loading images by putting the files in the "res" folder and use:
    try
    img = Image.createImage("/burgerimgsmall.jpg");
    catch (Exception e)
    e.printStackTrace();
    But my project requires me to load an image from a URL. How do I go about doing that? If it helps, here's the URL:
    http://img.photobucket.com/albums/v703/punkgila/burgerimgsmall.jpg
    Thanks guys!

    Don't worry, downloading image from http is also simple. Look into Photoalbum demo in wtk2.5

  • Need help loading pics from multiple catalogs on Photoshop Elements 3

    In the past, I've synched my photos from Photoshop Elements 3 to my video Ipod without a problem, but I only had one catalog in Elements. I created a new catalog and wanted to upload some of the pictures in the NEW catalog to my ipod. The trouble is, when I go into the photo preferences in my Ipod, it only shows the albums in the catalog I'm in. I want to load some pics from both catalogs. If I switch to the second catalog it erases everything it loaded previously from the first catalog. Does anyone know a way to upload from multiple catalogs on my Ipod? Is it possible to do?
    Thanks!

    In the past, I've synched my photos from Photoshop Elements 3 to my video Ipod without a problem, but I only had one catalog in Elements. I created a new catalog and wanted to upload some of the pictures in the NEW catalog to my ipod. The trouble is, when I go into the photo preferences in my Ipod, it only shows the albums in the catalog I'm in. I want to load some pics from both catalogs. If I switch to the second catalog it erases everything it loaded previously from the first catalog. Does anyone know a way to upload from multiple catalogs on my Ipod? Is it possible to do?
    Thanks!

  • Need help loading tracks from compact disc

    I get my CD ejected on my powerbook when I insert some of my cd's to burn into my itunes folder. On my eMac I can load the songs fine. What gives? why does one computer eject the disc and the other will accept it and burn?

    What kind of disks? Pressed AudioCDs, DUAL-Disks or burned AudioCDs?
    Especially Dual-Disks will cause lots of problems when being used in slim line slot-it drives as those disks are not (completely) compatible to red book definitions.

  • Need help loading songs from computer to iPhone

    Problem moving songs from computer to iPone in same order

    How are you trying to get music on the phone, either via sync or manually manage music? And, what are you referring to when you say "in same order"?

  • Load on Error in LKM File To Oracle (SQLLDR)

    We are using LKM File To Oracle (SQLLDR) to upload bulk data file into oracle table. We have a data files which contains 1000 records. For testing we create 500 good records and 500 bad records in this file. Now we want to upload this data file into oracle table.
    I set LKM File To Oracle (SQLLDR) LOA_ERROR param = 10000.
    After running this scenario I found an exception at 4 step of this process "Call sqlldr via Jython".
    I can not understand... why this exception is comming.

    Hi,
    It seems like some problem with your data, if you look into the operator log then you can find the name of the log file from the description tab of "Call sqlldr via jython" step. It will give more exception details to fix the issue.
    Thanks,
    Saravanan Rajavel

  • Need help in loading Data file

    I am new to HFM. I am trying one example and try to load data file. But i am getting error saying period July is invalid.
    Do i have to follow certain steps before loading data file.
    Sample file
    !Column_Order = Scenario, Year, Period, View, Entity, Value, Account,ICP, Custom1, Custom2, Custom3, Custom4
    !DATA
    Actual; 2008; July; Periodic; EastSales; USD; Salaries; [ICP None]; P3000_Phones; Electronic_City; [None]; Increases;22

    Use the label associated with July instead of the description. The label for July in your application is probably JUL or JLY - I've seen both. Also, if the column order is the default order, you do not need the !Column_order line.

  • How to load date and time from text file to oracle table through sqlloader

    hi friends
    i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
    this is my data in this path (c:\external\my_data.txt)
    7369,SMITH,17-NOV-81,09:14:04,CLERK,20
    7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
    7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
    7566,JONES,02-APR-81,09:24:10,MANAGER,20
    7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
    create table emp2 (empno number,
                      ename varchar2(20),
                      hiredate date,
                      etime date,
                      ejob varchar2(20),
                      deptno number);the control file code in this path (c:\external\ctrl.ctl)
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>any help i greatly appreciated
    thanks
    Edited by: user10947262 on May 31, 2010 9:47 AM

    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)Try
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
    this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>
    That's not an error, you can see errors within log and bad files.

  • Loading data from .csv file into Oracle Table

    Hi,
    I have a requirement where I need to populate data from .csv file into oracle table.
    Is there any mechanism so that i can follow the same?
    Any help will be fruitful.
    Thanks and regards

    You can use Sql Loader or External tables for your requirement
    Missed Karthick's post ...alredy there :)
    Edited by: Rajneesh Kumar on Dec 4, 2008 10:54 AM

  • Import data from excel/csv file in web dynpro

    Hi All,
    I need to populate a WD table by first importing a excel/CSV file thru web dynpro screen and then reading thru the file.Am using FileUpload element from NW04s.
    How can I read/import data from excel / csv file in web dynpro table context?
    Any help is appreciated.
    Thanks a lot
    Aakash

    Hi,
    Here are the basic steps needed to read data from excel spreadsheet using the Java Excel API(jExcel API).
    jExcel API can read a spreadsheet from a file stored on the local file system or from some input stream, ideally the following should be the steps while reading:
    Create a workbook from a file on the local file system, as illustrated in the following code fragment:
              import java.io.File;
              import java.util.Date;
              import jxl.*;
             Workbook workbook = Workbook.getWorkbook(new File("test.xls"));
    On getting access to the worksheet, once can use the following code piece to access  individual sheets. These are zero indexed - the first sheet being 0, the  second sheet being 1, and so on. (You can also use the API to retrieve a sheet by name).
              Sheet sheet = workbook.getSheet(0);
    After getting the sheet, you can retrieve the cell's contents as a string by using the convenience method getContents(). In the example code below, A1 is a text cell, B2 is numerical value and C2 is a date. The contents of these cells may be accessed as follows
    Cell a1 = sheet.getCell(0,0);
    Cell b2 = sheet.getCell(1,1);
    Cell c2 = sheet.getCell(2,1);
    String a1 = a1.getContents();
    String b2 = b2.getContents();
    String c2 = c2.getContents();
    // perform operations on strings
    However in case we need to access the cell's contents as the exact data type ie. as a numerical value or as a date, then the retrieved Cell must be cast to the correct type and the appropriate methods called. The code piece given below illustrates how JExcelApi may be used to retrieve a genuine java double and java.util.Date object from an Excel spreadsheet. For completeness the label is also cast to it's correct type. The code snippet also illustrates how to verify that cell is of the expected type - this can be useful when performing validations on the spreadsheet for presence of correct datatypes in the spreadsheet.
      String a1 = null;
      Double b2 = 0;
      Date c2 = null;
                        Cell a1 = sheet.getCell(0,0);
                        Cell b2 = sheet.getCell(1,1);
                        Cell c2 = sheet.getCell(2,1);
                        if (a1.getType() == CellType.LABEL)
                           LabelCell lc = (LabelCell) a1;
                           stringa1 = lc.getString();
                         if (b2.getType() == CellType.NUMBER)
                           NumberCell nc = (NumberCell) b2;
                           numberb2 = nc.getValue();
                          if (c2.getType() == CellType.DATE)
                            DateCell dc = (DateCell) c2;
                            datec2 = dc.getDate();
                           // operate on dates and doubles
    It is recommended to, use the close()  method (as in the code piece below)   when you are done with processing all the cells.This frees up any allocated memory used when reading spreadsheets and is particularly important when reading large spreadsheets.              
              // Finished - close the workbook and free up memory
              workbook.close();
    The API class files are availble in the 'jxl.jar', which is available for download.
    Regards
    Raghu

Maybe you are looking for

  • Stills from QuickTime movie

    I have been attempting to collect stills from QT movies and find they all have horizontal lines impairing the images. Is there any way to avoid this ? Many thanks.

  • Customer oustanding report

    Hi Friends I got one requirement from user ... My requirement is Customer Outstanding by month ....this includes current month and last five months , All previous items under one colum... For this report fom where i can fetch the data ...... Please g

  • Dialog prog. doubt

    hi alll, i've created one dialog prog. in that prog. i created inserted table control. in that control i placed two TXTNAME and TXTAGE (input/output field). BUT I activated, the folllowing error occurs during runtime : The txtname is not assigned to

  • I can copy a URL, but cannot paste it in the body of an e-mail. Also doen't hypelink it. I do not have this problem using Internet Explorer..

    When I copy a URL and go to paste it in an e-mail, it won't paste. Some other box opens. I can paste the URL in the subject line, but doesn't hyperlink it. (blue) When using Internet Explorer, I don't have this problem. I'm new to FF with a new compu

  • How do I put a thin 1px rectangle around an image?

    Using Photoshop CS5, can someone tell me how I put a thin 1px rectangle around an existing image For example, imagine I have an image that 500px wide and 200 px high I want a 10px gap all around and then I want the thin rectangle What would the prope