Import data in Excel to database table

How to insert data from excellent to the database table?

I did the following...,.

2 create an HTML page with item browse file.
3. loading of a button created.
3. created as a result of the process to run by pressing the download button.

BEGIN
DECLARE
v_blob_data BLOB;
v_blob_len NUMBER;
V_POSITION NUMBER;
v_raw_chunk RAW (10000);
v_char char (1);
number of c_chunk_len: = 1;
v_line VARCHAR2 (32767): = NULL;
v_data_array wwv_flow_global.vc_arr2;
number of v_rows;
number of v_sr_no: = 1;
v_rows_loaded NUMBER;

BEGIN

-Read data from wwv_flow_files
Select blob_content from v_blob_data
of wwv_flow_files
where last_updated = (select max (last_updated) in the wwv_flow_files where UPDATED_BY =: APP_USER)
and id = (select max (id) in the wwv_flow_files where updated_by =: APP_USER);


v_blob_len: = dbms_lob.getlength (v_blob_data);
V_POSITION: = 1;

-Read and convert binary to a char
WHILE (v_position < = v_blob_len) LOOP
v_raw_chunk: = dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
v_char: = chr (hex_to_decimal (rawtohex (v_raw_chunk)));
v_line: = v_line | v_char;
V_POSITION: = v_position + c_chunk_len;
-When a whole line is retrieved < / span >
IF v_char = Chr (10) THEN
-Convert comma to: use of wwv_flow_utilities
v_line: = REPLACE (v_line, ', ' :'); ")
-Converting each column separated by: in the data table
v_data_array: = wwv_flow_utilities.string_to_table (v_line);
-REMOVE THE OLD DATA
-Insert data into the target table
IF v_sr_no > 1 THEN
RUN IMMEDIATELY ' INSERT INTO EMPO(ID,EMP_ID,NAME,TYPE,JOIN_DATE,LOCATION)
"VALUES (: 1,: 2: 3: 4: 5: 6).
USING
-v_sr_no,
v_data_array (1),
v_data_array (2),
v_data_array (3),
v_data_array (4),
v_data_array (5),
v_data_array (6).
END IF;
-Remove
v_line: = NULL;
v_sr_no: = v_sr_no + 1;
END IF;
END LOOP;

END;

END;



When this procedure of irun, it shows no data found.
Impossible to take less.

Hello

Try this

BEGIN
  DECLARE
    v_blob_data BLOB;
    v_blob_len NUMBER;
    v_position NUMBER;
    v_raw_chunk RAW(10000);
    v_char      CHAR(1);
    c_chunk_len NUMBER           := 1;
    v_line      VARCHAR2 (32767) := NULL;
    v_data_array wwv_flow_global.vc_arr2;
    v_rows        NUMBER;
    v_sr_no       NUMBER := 1;
    v_rows_loaded NUMBER;
  BEGIN

    -- Read data from wwv_flow_files
    SELECT blob_content
    INTO v_blob_data
    FROM wwv_flow_files
    WHERE name = :Px_YOUR_ITEM
    ;

    v_blob_len := dbms_lob.getlength(v_blob_data);
    v_position := 1;
    -- Read and convert binary to char
    WHILE ( v_position <= v_blob_len )
    LOOP
      v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
      v_char      := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
      v_line      := v_line || v_char;
      v_position  := v_position + c_chunk_len;
      -- When a whole line is retrieved 
      IF v_char = CHR(10) THEN
        -- Convert comma to : to use wwv_flow_utilities
        v_line := REPLACE (v_line, ',', ':');
        -- Convert each column separated by : into array of data
        v_data_array := wwv_flow_utilities.string_to_table (v_line);
        --DELETE OLD DATA

        /* fill array if less than 6 columns */
        FOR i IN v_data_array.COUNT .. 6
        LOOP;
          v_data_array(i) := NULL;
        END LOOP;

        -- Insert data into target table
        IF v_sr_no >1 THEN
          EXECUTE IMMEDIATE
          'INSERT INTO EMPO(ID,EMP_ID,NAME,TYPE,JOIN_DATE,LOCATION)
          VALUES (:1, :2, :3, :4, :5, :6)'
          USING
          -- v_sr_no,
          v_data_array(1),
          v_data_array(2),
          v_data_array(3),
          v_data_array(4),
          v_data_array(5),
          v_data_array(6);
        END IF;
        -- Clear out
        v_line  := NULL;
        v_sr_no := v_sr_no + 1;
      END IF;
    END LOOP;
  END;
END;

Replace Px_YOUR_ITEM with your file browser object.

PRECESS should insert null if there are not enough columns in your data

Kind regards
Jari

Tags: Database

Similar Questions

  • How to import data in Excel sheet to the database using ADF BC

    Hello

    Can someone help me in suggesting how to import data from excel to database.

    Thank you

    Kunal Sharma

    Hello

    You can use the API to read each line of the file excel with your application and the creation of lines for each line that you read.

    See link

    http://www.codejava.NET/coding/how-to-read-Excel-files-in-Java-using-Apache-POI

  • Import data from Excel to ADF

    Hello world
    I need to import data from excel file that I've seen some posts as
    http://technology.AMIS.nl/Blog/8418/ADF-11g-import-from-Excel-into-an-ADF-table
    but it did not work with me.
    Thank you

    N °
    ADFDi binds ADF (web) with MS Office.
    See this demo: http://download.oracle.com/otn_hosted_doc/jdeveloper/111demos/ADFdi_Overview/Overview-ADFdi11g.html

  • Import data from Excel

    Is it possible to import data from Excel into a pdf form.

    I have some text on a form fields that need to be filled automatically.

    Thanks in advance.

    : )

    To manually import from Excel, the simplest method is to first convert a spreadsheet to a tabs-delimited text file. The first line of the sheet must be the exact field names (case matters) corresponding to the data in the following lines.

    In Acrobat 9, you can import a row of data from the file by selecting: forms > manage form data > import data...

    and select the file, then one row of data in the file.

    If you want to do it automatically or by any other non-manual method, post again and provide more information.

  • How to select data from a remote database table?

    Hi friends,

    I think I've seen before a sqlplus program that can select data from a remote database table?

    Witnessed: IP, SID, PORT

    The following is correct?

    (I am connected to a local database)
    SELECT COUNT (*) IN THE EMP@IP:SID/PORT;


    Thank you very much


    Ms. K

    Salvation;

    I think, that you can create dblink wihtout any problem yet, it's a PROD. After your selection, you can drop dblink

    Respect of
    HELIOS

  • export from excel to database table

    Hello

    I have a requirement to export the data from the excel file to the database table.

    I downloaded using sqlloader... using the control file

    and are there other options to download the data...

    Day, now that we have a lot of tools to download

    SQL Developer tool

    Toad

    Using the Excel formula

    UTL_FILE...

  • Import data from Excel in PDF with Acrobat Pro XI - is it possible? How?

    I need to be able to create a pdf file where certain information can be merged to an Excel spreadsheet in the pdf file so that our land use specialists can use tablets to fill the field. I also need to be able to create a field where the user can join or import a jpg file. Is it possible to do this with Acrobat Pro XI? Another program is necessary. I need to know the answers to my questions by January 28, 2016.

    Hi shannonr80675036,

    Yes, but you there are two things you need to do in Excel for this to work:

    Columns must be named the same as the field names in the PDF form. The names that you use in your PDF form, or you must change the names of fields in the PDF form so that they correspond to the column names in Excel, you can either match. In this example, I took the first approach and used the field names as my column headings:

    When you export your data to Excel file, you must select the "Tab Delimited Text" format. It is one of the export options in Excel (and other spread sheet applications) which is available when you select file > save as:

    Once you have your tabs-delimited text file, open your PDF form, and then select Tools > forms > more form Options and click Import:

    In the file dialog box, select this option to import a text file, browse to your exported text file and select it. In the next screen, you can then choose what import record, you can import only one record at a time:

    This will complete the PDF form with the selected values:

    That, for each record you have in your Excel file and save the PDF file under a new name.

    Kind regards

    Nicos

  • Import data from Excel - I won't be as final result table

    Hello!

    Import XLS data discussed a lot already. I don't want to create a table, but I need to import text for executives of related texts prepared in the entire document.

    Take a look at the IMG below. There are about 300 such cells. Photo and textframe, below. I have the XLS file with all the info. And I need this information should be asked that {green in the IMG} linked text frames. Is the only solution to copy > switch to the window of identification-> paste > remove redundant paragraphs > switch to the Excel window? It would take a thousand clicks of mouse and keystrokes...

    http://i.imgur.com/XVTrW.png

    The structure of my textframe looks like this {Ulm has been typed manually}:

    http://i.imgur.com/bnHYP.png

    Each paragraph takes source in the XLS file:

    http://i.imgur.com/4JoIO.png

    I can't import the Excel table when I wan to create tables of ID. But I have just a bunch of textfields...

    Thank you!

    Maybe it's a job to merge data or a commercial catalogue of plugin, but the merged celss are going to be a real problem, I think. Exporting to a file text to Excel and palcing just can also work, with the same caveat about merged cells and the likely need to use find/replace to remove tabs.

  • The most effective way to import data from Excel in InDesign?

    Hi all

    I'm designing for a prospectus of college which includes 400 + courses list. For the moment, these lists exist as a huge Excel sheet with fields such as course type, course code, description, etc.

    I am familiar with Excel data import in InDesign and the tables/creation of table styles and other formatting, but the problem I have is that the data are in several columns by courses in the Excel worksheet, but will be in a single column per course with several lines in the InDesign document. I can't find a way to easily convert these columns in lines.

    Someone can help me with an effective way to get the data in the page layout without laborious copying and pasting or formatting?

    Thanks in advance!

    Hello

    In excellent paste / transpose

  • How do I import data from Excel

    Here's a problem I don't know how to solve.

    I have a file, InDesign (a price list) in which a text column contains only the price.

    Because prices are constantly changing, and because they must be converted into other currencies I need to be able to link the numbers in an Excel file.

    Is this possible and what is the easiest way?

    For example, how can I specify the column in the Excel file that is linked?

    The vertical spacing of prices is not always equal - there are often empty lines.

    The Excel file needs to have the same white lines or is there an automatic way to InDesign to recognize the data and distribute it correctly?

    Here is a picture to show what I got. The price column is highlighted.

    Pricelist_shot.jpg

    This is how it works with links. Formatting returns to what exists in the worksheet unless you use the Table Styles (and I don't remember when they were introduced, but I'm not sure you have) in CS3. To avoid having to reformat, make the formatting in Excel.

  • import data from excel files variables

    Im trying to find a way to import 3 sets of variable data

    in a provision saying a certificate variables being, for example, a name, a date of passage and a location.

    instead of typing 100 different certificates is there a way to create a layout with 3 variable data fields can import information from a pre existing excel file, thus making 100 different pages I can send it to print.  the work exists in bridge CS4 and I have an excel with all the info file, the info should be formatted in a specific way.

    HELP this is a persistent problem.

    Don't worry, it's not difficult (if the XML is very good) you can select and set any text or dynamic object... But to explain here is a little difficult to do... a video tut this is what you need...

    G

  • How to write data in an existing database table in sql using table in lab mode

    I am trying to write the data to an existing table in sql databse.but I don't know how to get it done me .plz help

    The error text is clear: the data provided does not match the number of columns. Your insertion data have 3 columns, how is appointed in the control of columns?

    It would be easier if you attached the VI with orders paid at the current values as default value.

    /Y

  • Automatically import data from excel file

    Hi guys,.

    Is it possible to make a batch / script that can extract data from an excel sheet? I have a spreadsheet with two columns, one with a photo ID and a column with the name of specific individuals (who is in the picture of course).

    So is it possible to make a script that does something like this:

    1. open an image with a unique number, for example. 0001.jpg

    2. search for 0001.jpg in the excel data and automatically remove the name of the excel worksheet data and paste this into a text layer in photoshop

    3. save this image with the same unique number in another directory

    I google it for decades, but unfortunately I can not find!

    Thank you

    Robin

    Yes, it's called Variables.  Here are some tutorials:

    Using external Variables in Photoshop with the Data Source

  • How can I import the participants of a database table?

    Hey guys.
    We have a table of our employee information data base, and we want to create the participants based on this table.
    How can I do?

    Thank you.

    Hello
    There is a thread is interesting in this forum related to this:
    Re: Api FRP-implementation to date of the role
    Concerning

  • How to make a hyperlink with dynamic data from a php database table?

    Level - the rare user Dreamweaver

    I have a couple of master / detail standard of pages using MySQL and PHP. This feature works correctly. Among the items of data in the Details page contains the name of a PDF file (including the .pdf suffix). PDF files are stored in the library of PDF documents under the root of the Site. I am eager to the ability of the user to the page to watch the associated PDF. Keep it as simple as possible I just put in place a text field "View report" followed dynamic text for the name of the document. I tried to set the properties of the links with the library name PDF files (more the root level) followed by the code, I thought that it was necessary to determine the selected PDF (<? php echo $row_rslivesDetail ['link'];? >). The first part is correct, because when the code does not have I changed it to a PDF fixed and that worked. I have tried various combinations but failed. Can anyone please suggest what I'm doing wrong with the code.

    Concerning

    Cliff

    I think you have your recordset named incorrectly. The image you provided according to me it should be: (see highlighted in RED below)

    ">View the report

Maybe you are looking for

  • Keynote presentation

    I created a keynote presentation, I want to export as a quicktime movie, I want to click through the slides with a simple click by slide, When I click the slide after the slide automatically animations. Then it stops I click once again to the next sl

  • Windows 8.1 in English on the IdeaPad z50-75

    Hey,. I bought my laptop from france while windows is in french... I installed language pack core of the system is still in french. How could I install windows legit 8.1 on what is in English. Not now but soon, I want to replace this slow hard disk w

  • need for speed does not work on windows 7

    What should I do you need for shift work speed on windows 7 when I enter the game windows gives me a black screen and gives me a massage (need for speed change has stoped working)

  • Windows XP safe mode does not

    The computer, I work with the University running windows xp sp2, not authentic and is infected with several viruses and to among which are Sality.AT and Hikjav! INF and Hikjav! At and some more... I had Avira installed on the computer and I uninstall

  • Microsoft Remote Desktop & Client iPad RD - mouse?

    Hi, I use your Clien RD large in my iPAD to work to connect remotely (via VPN) to my office/computer laptop at the office. It works very well with my Bluetooth keyboard, but miss me the mouth to be fully operational on the iPad. y at - it all mouse/i