Loading the data from a packed decimal format file using a sql*loader.

Hi ,
In one of the project i'm working here i have to load the data into oracle table from a file using a Sql*loader but the problem is the data file is in the packed decimal format so please let me know if there is any way to do this....I search a lot regarding this ..If anybody faced such type of problem ,then let me the steps to solve this.
Thanks in advance ,
Narasingarao.

declare
f utl_file.file_type;
s1 varchar2(200);
s2 varchar2(200);
s3 varchar2(200);
c number := 0;
begin
f := utl_file.fopen('TRY','sample1.txt','R');
utl_file.get_line(f,s1);
utl_file.get_line(f,s2);
utl_file.get_line(f,s3);
insert into sampletable (a,b,c) values (s1,s2,s3);
c := c + 1;
utl_file.fclose(f);
exception
when NO_DATA_FOUND then
if utl_file.is_open(f) then utl_file.fclose(f); ens if;
dbms_output.put_line('No. of rows inserted : ' || c);
end;SY.

Similar Messages

  • Loading the data from a text file to a table using pl/sql

    Hi Experts,
    I want to load the data from a text (sample1.txt) file to a table using pl/sql
    I have used the below pl/sql code
    declare
    f utl_file.file_type;
    s varchar2(200);
    c number := 0;
    begin
    f := utl_file.fopen('TRY','sample1.txt','R');
    loop
    utl_file.get_line(f,s);
    insert into sampletable (a,b,c) values (s,s,s);
    c := c + 1;
    end loop;
    exception
    when NO_DATA_FOUND then
    utl_file.fclose(f);
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;
    and my sample1.txt file looks like
    1
    2
    3
    The data is getting inserted, with below manner
    select * from sampletable;
    A     B     C
    1     1     1
    2     2     2
    3     3     3
    I want the data to get inserted as
    A     B     C
    1     2     3
    The text file that I have is having three lines, and each line's first value should go to each column
    Please help...
    Thanks

    declare
    f utl_file.file_type;
    s1 varchar2(200);
    s2 varchar2(200);
    s3 varchar2(200);
    c number := 0;
    begin
    f := utl_file.fopen('TRY','sample1.txt','R');
    utl_file.get_line(f,s1);
    utl_file.get_line(f,s2);
    utl_file.get_line(f,s3);
    insert into sampletable (a,b,c) values (s1,s2,s3);
    c := c + 1;
    utl_file.fclose(f);
    exception
    when NO_DATA_FOUND then
    if utl_file.is_open(f) then utl_file.fclose(f); ens if;
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;SY.

  • Error in loading the data from flatfile

    Hello All,
           when am loading the data from flat file iam getting error  "ERROR4 WHEN LOADING THE EXTERNAL DATA"  is it because of mapping  in the transferrules or error in the flat file.
    Points will be assigned to all  helpful answer.
    Thanks & Regards
    Priya

    Hii Priya,
    The reasons may be the file is open, the format/flatfile structure is not correct, the mapping/transfer structure may not be correct, presence of invalid characters/data inconsistency in the file, etc.
    Check if the flatfile in .CSV format.
    You have to save it in .CSV format for the flatfile loading to work.
    Also check the connection issues between source system and BW or sometimes may be due to inactive update rules.
    Refer
    error 1
    Find out the actual reason and let us know.
    Hope this helps.
    Regards,
    Raghu.

  • Unable to load the data from PSA to INFOCUBE

    Hi BI Experts, good afternoon.
        I am loading 3 years data( Full load ) from R/3 to Infocube.
       So loaded the data by monthwise. So i created 36 info packages.
      Everything is fine. But i got a error in Jan 2005 and Mar 2005. It is the same error in both months. That is Caller 01and caller 02 errors( Means invalid characteristics are there PSA data )
    So i deleted both PSA and Data target Requests and again i loaded the data only to PSA.
      Here i got data in PSA without fail.
      Then i tried to load the data from PSA to Infocube MANUALLY.
    But its not happening.
      One message came this
           SID 60,758 is smaller than the compress SID of cube ZIC_C03; no        request booking.
       Please give me the solution how to solve this problem.
      Thanks & Regards
         Anjali

    Hi Teja,
       Thanks for the good response.
      How can i check whether it is already compressed or not?
      Pls give me the reply.
      Thanks
              Anjali

  • Regarding  Loading the data from DSO to cube.

    Hello Experts,
    I have DSO which loads data from psa  using 7.0 tranformation (using DTP).  And i have a cube which loads the data from that DSO using 3.x transfer rules. Now i have deleted the init request for a infopack before load the data into DSO. But when i load the data from DSO to cube by  right click on DSO -> click On Additional Functions -> update the 3.x data to targets, It is giving me an error like 'Delete init. request REQU_4H7UY4ZXAO72WR4GTUIW0XUKP before running init. again with same selection
    Please help me with this.
    i want to load the data in the init request to cube..
    Thanks

    Hi Shanthi,
    Thanks For reply. I have already deleted the init request from source system to DSO and then i have tried still i am getting the error.
    Thanks

  • Load the data from a transparent customised table in BW to an ODS

    Hi there,
    How can you load the data from a transparent customised table created in BW to an ODS.
    Many thanks.
    Sarah

    Hi,
    just create a generic datasource in rso2 for that table, replicate the datasource for source system 'myself', create a infosource and assign the new datasource to that infosource. Create a update rule from infosource to ods, create a infopackage and load the data.
    regards
    Siggi

  • When Loading the data from a french Language

    Hi all
    First let me Wish u Happy Friendshipday
    When iam loading the data from a french system. Do i need to have a french key board.
    And wht measures should i take to load a load when it is not in english language..

    Hi
    You dont need a french keyboard!
    Just make sure that the french language is installed in your BW system
    TO check this go to transaction RZ10 and select a defined parameter.
    In it, see if apart from English and German, if french is also checked. Installation of language is job of basis guys and check with them too
    Hope this helps
    Prakash
    Assigning points is a way of saying thanks on SDN

  • How to Load the data from excel file(Extension is .CSV) into the temp.table

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Hello Sachin,
    You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
    Instead of copy values into forms you can save them in your temporary table.
    Kind regards,
    Alex
    If someone's helpful or correct please mark it accordingly.

  • How to load the data from .csv file to oracle table???

    Hi,
    I am using oracle 10g , plsql developer. Can anyone help me in how to load the data from .csv file to oracle table. The table is already created with the required columns. The .csv file is having about 10lakh records. Is it possible to load 10lakh records. can any one please tell me how to proceed.
    Thanks in advance

    981145 wrote:
    Can you tell more about sql * loader??? how to know that utility is available for me or not??? I am using oracle 10g database and plsql developer???SQL*Loader is part of the Oracle client. If you have a developer installation you should normally have it on your client.
    the command is
    sqlldrType it and see if you have it installed.
    Have a look also at the FAQ link posted by Marwin.
    There are plenty of examples also on the web.
    Regards.
    Al

  • How to load the data from excel file into temprory table in Forms 11g?

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Declare
        v_full_filename         varchar2(500);
        v_server_path           varchar2(2000);
        v_separator             VARCHAR2(1);
        v_filename              VARCHAR2(400);
        filename                VARCHAR2 (100);
        v_stop_load             varchar2 (2000);
        v_rec_error_log         varchar2(4000);
        v_error_log             varchar2(4000);
        ctr                     NUMBER (12);
        cols                    NUMBER (2);
        btn                     number;
        RES                     BOOLEAN;   
        application             ole2.obj_type;
        workbooks               ole2.obj_type;
        workbook                ole2.obj_type;
        worksheets              ole2.obj_type;
        worksheet               ole2.obj_type;
        cell                    ole2.obj_type;
        cellType                ole2.OBJ_TYPE;
        args                    ole2.obj_type;
        PROCEDURE olearg
        IS
        args   ole2.obj_type;
        BEGIN
        args := ole2.create_arglist;
        ole2.add_arg (args, ctr);                                
        ole2.add_arg (args, cols);                                   
        cell := ole2.get_obj_property (worksheet, 'Cells', args);
        ole2.destroy_arglist (args);
        END;
    BEGIN
    v_full_filename := client_get_file_name(directory_name => null
                                     ,file_name      => null
                                     ,file_filter    => 'Excel  files (*.xls)|*.xls|'  
                                                                            ||'Excel  files (*.xlsx)|*.xlsx|'                                                                 
                                     ,message        => 'Choose Excel file'
                                     ,dialog_type    => null
                                     ,select_file    => null
    If v_full_filename is not null Then
    v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
    v_filename := v_separator||v_full_filename ;
    :LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);                                
    RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));     
    --Begin load data from EXCEL
    BEGIN
        filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
        application := ole2.create_obj ('Excel.Application');
        ole2.set_property (application, 'Visible', 'false');
        workbooks := ole2.get_obj_property (application, 'Workbooks');
        args := ole2.create_arglist;
        ole2.add_arg (args, filename); -- file path and name
        workbook := ole2.get_obj_property(workbooks,'Open',args);
        ole2.destroy_arglist (args);
        args := ole2.create_arglist;
        ole2.add_arg (args, 'Sheet1');
        worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
        ole2.destroy_arglist (args);
        ctr := 2;                                                     --row number
        cols := 1;                                                -- column number
        go_block('xxx');
        FIRST_RECORD;  
        LOOP       
                --Column 1 VALUE --------------------------------------------------------------------
            olearg;
            v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            :item1 := v_stop_load;
            cols := cols + 1;                                                      
              --Column 2 VALUE --------------------------------------------------------------------
            olearg;
            :item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            cols := cols + 1;
            --<and so on>
        ole2.invoke (application, 'Quit');
        ole2.RELEASE_OBJ (cell);
        ole2.RELEASE_OBJ (worksheet);
        ole2.RELEASE_OBJ (worksheets);
        ole2.RELEASE_OBJ (workbook);
        ole2.RELEASE_OBJ (workbooks);
        ole2.RELEASE_OBJ (application);
    END;
    --End load data from EXCELPlease mark it as answered if you helped.

  • 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

  • Error while loading the data from text file

    Hi,
    I got an error " Data Value Encountered before all Dimensions selected" while loading the data from the text file.
    Can any one please suggest me the solution.

    Possible Solutions
    Make sure that the data source is valid.
    Is a member from each dimension specified correctly in the data source or rules file?
    Is the numeric data field at the end of the record? If not, move the numeric data field in the data source or move the numeric data field in the rules file.
    Are all members that might contain numbers (such as "100") enclosed in quotation marks in the data source?
    If you are using a header, is the header set up correctly? Remember that you can add missing dimension names to the header.
    Does the data source contain extra spaces or tabs?
    Has the updated outline been saved?

  • Error while loading the data from excel to database.

    Hi,
    I am using PL/SQL developer to load the data from excel to database. I will set the data source in the control panel and will proceed through ODBC importer in pl/sql developer to import the data.
    What exactly the error is when i click the filename to view the result preview it shows an error as:
    The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
    Kindly help with solution.
    Thanks/Regards
    Sakthivarman J.

    Hello;
    That error message comes from Microsoft, so something in you Excel sheet is the cause.
    Its a pain but I would check properties of each column in case Excel decided to add something, a comma for example.
    Do you have a column over 255 characters? Look there first. If any length is greater than 255 it will crash and burn.
    Or convert it to a CSV and create an external table.
    Best Regards
    mseberg
    Might also throw an 3163 as an error where you cannot see it.
    Edited by: mseberg on Sep 9, 2011 7:34 AM

  • Error while loading the data from ODS to InfoCube

    hai
    Im trying to load the data from ODS to InfoCube for particular year .
    But it says that there is a source system problem .
    why it is like that .
    pls tell me
    i ll assing the points
    rizwan

    Hi Rizwan,
    you didn't mention the error message in details. there could be a few places to be checked:
    - check if BW itself source system is active and in tact and reactivate if necessary
    - check if update rule is active and reactivate if necessary
    - check if ODS is active and reactivate if necessary
    Regards,
    Lilly

  • Error when loading the data from PSA to ODS......

    Hi BW guru's,
    i am facing one problem while loading the data from PSA to ODS.so please help me in this regard.
    Please give a step by step guidelines for me...
    the error while loading the data from PSA to ODS is "There are no PSA tables for these selection criteria","An error occurred when reading PSA data".
    thanks in advance,
    ashok.

    hi ashok,
    u can push data from  psa to ods, for this goto the psa in rsa1>psa>goto that request>rightclick>select " schedule update Immediately ", then data will moved from psa to ods.
                                                 or
    In ods > delete the failed request>goto the processing tab-->select 3rd option   " psa and then subsequentially to data targets ", --> schedule the infopackage.
    bye
    sunil

Maybe you are looking for

  • Bill from CMR Claims in Oklahoma City, OK

    We have a case just like one in another thread where I nicked our Vierizon Fios line because it was only buried two inches deep in an unexpected place across the middle of our back yard.  When I called Verizon Service about it they assured me that th

  • Is there a comparison chart of webgui vs sapgui?

    Hi, I've been trying to find  comparisons of the strengths and weaknesses of webgui compared to sapgui. The purpose is to determine if it would be possible to just switch to webgui rather than building another Citrix farm for our users (about 3000). 

  • Finder - Create new files directly from a folder using finder ?

    In Finder, is there a way to do a right-click in a folder and create a new file like: New Text File or New Document from that location? I used to do this oftenly in Windows (right click, New Word document) but I have not found it in Mac OS X, any wor

  • OS 9 system folder for Mini PowerPC G4

    Hi all. I need to use my Mini G4 in classic mode (it's running 10.4.11).  I still have the original install discs that came with the machine when new but although they look OK, furstratingly the CD-ROM drive rejects them - I think I only need the sys

  • Huge delay in query output if we drilldown.

    Hi Experts, We are using BIA for some of our queries. The query results are got in quick time. But if we drilldown , it takes lot of time to fetch the results. We have the data in the main memory after creating the index. Do I need make some addition