How to insert rows in Board signout to recurring weekly entires

I need help for create a simple procedure for lines inserted in the Council Signout database for entries "recurring weekly.
The schema is SIGNOUT in the DEV10G database.
There are three main tables: UKIMR, the REASONand SIGNOUT
My first thought is that the procedure takes as arguments:
-name, surname
-first name
-start date
-number of weeks
-the type of entry (for example, "telecommuting")
-Comment
Note: I use the name as args because that's how columns are configured in the UKIMR table.
So all it would do is create entries on the same day-of-the-week as the * 'start date' * for as many weeks as you indicate in the * 'number of weeks' * argument.
So this would be an example of calling script:_
* exec STP_InsertWeekly ("Lastname", "firstname", October 3, 2008 ', 5, 'Teleworking', null);
Which would insert 5 rows SIGNOUT for 5 Friday October.

Published by: user4653174 on October 3, 2008 10:28

Published by: user4653174 on October 3, 2008 10:29

Published by: user4653174 on October 3, 2008 10:31

user4653174 wrote:
I want to see my procedure to insert rows in the table SIGNOUT. When I run that it is has the below error. The purpose of this procedure is for the employee to enter their name, the date they want to be turned off or work from home, or anything else, until they start, number of weeks (which will determine the number of rows will be inserted each week is a line), and comments that's what they do.

Interaction with the customer as request for input values, is done in a client tool such as SQL * Plus or web applications. Not in PL/SQL. This just PL/SQL procedure accepts input parameters and can be called from a client application.

The no data found error is due to a select... IN the statement, which fails to extract a single line. You must decide what you want your procedure to be done in this case. Ignore, not, one other message ease of use or...?

And please paste formatted code using code tags. You have been told several times now, please the Act itself.

Kind regards
Rob.

Tags: Database

Similar Questions

  • How to insert rows in multiple tables in a sql

    I want to know how to insert multiple lines in a single sql statement.

    Let's insert records into the table emp and dept in a sql statement.


    Thank you

    It's here

    SQL>l
      1  insert all
      2    into emp values(8888,'WADE','MANAGER',7839,'01-MAR-2008',5000,100,20)
      3    into dept values(50,'MARKETING','NEW YORK')
      4* select * from dual
    SQL> /
    
    2 rows created.
    

    SS

  • How to insert rows

    Dear members,

    I have a table with a few missing numbers in a col1.
    How can I add rows with missing data.
    beginning and ending number are given in the procedure.
    We say from 1 to 10.

    Table
    ID col1
    1 2
    3 R
    3 4
    4 9


    Required result after execution of the procedure.

    Table
    ID col1

    1 2
    3 R
    3 4
    4 9
    9 ½
    6 5
    6 of 7
    8 7
    9 8
    10 10


    can I have this procedure.



    concerning


    teefu.

    Published by: user_teefu on August 23, 2010 14:19

    Check this procedure...

    create or replace procedure p1 (p_st number, p_end number) is
    cursor c1 is
    select col1 from tabname;
    k number;
    begin
    for i in p_st..p_end
    loop
       for j in c1
       loop
       if j.col1 = i then
       k := 1;
       exit;
       else
       k := 0;
       end if;
       end loop;
       if k=0 then
       insert into tabname(col1) values (i);
       end if;
    end loop;
    end;
    
    SQL> select * from tabname;
    
          COL1
    ----------
             1
             4
             5
    
    SQL> exec p1(1,10);
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from tabname;
    
          COL1
    ----------
             1
             4
             5
             2
             3
             6
             7
             8
             9
            10
    
    10 rows selected.
    
  • How to insert rows in the table dynamically?

    I have a table with 18 ranks. Each of the first 17 rows have text read-only (mandatory activities) in a text field in the first column; the last line is a blank line with an Add button so that the user can add a new activity to the bottom of the table.

    I was invited to allow users to insert a new activity at any location in the table (by example, to insert a new 7 row after row 6), instead of just at the end of the table. (Of course this requires also remove the text in the text box of the activity and to change to the entry by the user, as well as a few other household activities, which should not be a problem if I can get just the line darn insert!)

    I searched the forums and looked at some of the examples ensure dynamics. From what I've seen, this should be fairly simple... but it does not work.

    Or rather, it works very well on the first line, several times even. I have a message box displays the indices of current and new line properly for each line. But in any other line as the first, insertInstance() gives me an error "index value is out of range" even when the message box displays the correct clues.

    Given the structure and the following code in each button an ActivityAdd line, can someone tell me what I'm doing wrong? Thank you!!!

    -------------------------------------------

    tableStructure.png

    ---------------------------------------------

    T_Activities.R_Activity [0]. T_AddRemove.R_Add.B_ActivityAdd::click - (JavaScript, client)

    var vNewRowIndex = this.parent.parent.parent.index + 1;

    xfa.host.messageBox ("the index of this line:" + this.parent.parent.parent.index + ".") Index of the new row: "+ vNewRowIndex +". ");"

    T_Activities.R_Activity.instanceManager.insertInstance (vNewRowIndex, 1);

    ------------------------------------------------

    FWIW, I've seen the warnings about the instance manager and features underscores in names of object... for better or worse, * all * of my names object * all * of my forms use underscores like this, and to the best of my knowledge I have never had a problem. So which proves to be the problem here, I'll gladly change the names in the table.

    Did you use java or formcalc when you got the error? I've recreated your table and the code works in formcalc.

    Concerning the insertIndex working in the first line, I think that maybe it's because you always refer to the first line (R_Activity).

  • How to insert rows from an xml file in a table

    IM Using Oracle 11g, is show below error when I run...



    declare
    charString varchar2 (80);
    finalStr varchar2 (400): = null;
    whole rowsp;
    v_FileHandle UTL_FILE. TYPE_DE_FICHIER;
    Start
    -the name of the table specified in our DTD
    xmlgen.setRowsetTag ('Zipcodes');
    -the name of the data set as shown in our DTD
    xmlgen.setRowTag ('mappings');
    -to get the result on the screen
    dbms_output. Enable (100000);
    -Open the XML document in read-only mode
    v_FileHandle: = utl_file.fopen (TMP_DIR1,'XML_NEW_CITIES.) XML', 'r');
    loop
    BEGIN
    UTL_FILE.get_line (v_FileHandle, charString);
    exception
    When no_data_found then
    UTL_FILE.fclose (v_FileHandle);
    "exit";
    END;
    dbms_output.put_line (charstring);
    If finalStr is not null then
    finalStr: = finalStr | charString;
    on the other
    finalStr: = charString.
    end if;
    end loop;
    -for the insertion of XML data in the table
    rowsp: = xmlgen.insertXML('SYS.) Codes POSTAL, finalStr);
    dbms_output.put_line ('INSERT FACT' |) To_char (rowsp));
    xmlgen.resetOptions;
    end;
    /




    XML_NEW_CITIES. XML is

    <? XML version = "1.0"? >
    < zip codes >
    < Record mappings = "4" >
    CA < STATE_ABBREVIATION > < / STATE_ABBREVIATION >
    < ZIPCODE > 94301 < / code >
    < CITY > Palo Alto < / CITY >
    < / maps >
    < Record mappings = "5" >
    < STATE_ABBREVIATION > CO < / STATE_ABBREVIATION >
    < ZIPCODE > 80323 < / code >
    < ZIP_CODE_EXTN > 9277 < / ZIP_CODE_EXTN >
    Boulder < CITY > < / CITY >
    < / maps >
    < / zip codes >




    Error report:
    ORA-06550: line 8, column 3:
    PLS-00201: identifier ' XMLGEN. SETROWSETTAG' must be declared
    ORA-06550: line 8, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 10, column 3:
    PLS-00201: identifier ' XMLGEN. SETROWTAG' must be declared
    ORA-06550: line 10, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 14, column 34:
    PLS-00201: identifier 'TMP_DIR1' must be declared.
    ORA-06550: line 14, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 31, column 12:
    PLS-00201: identifier ' XMLGEN. INSERTXML' must be declared
    ORA-06550: line 31, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 33, column 3:
    PLS-00201: identifier ' XMLGEN. RESETOPTIONS' must be reported
    ORA-06550: line 33, column 3:
    PL/SQL: Statement ignored
    06550 00000 - "line %s, column % s:\n%s".
    * Cause: Usually a PL/SQL compilation error

    Published by: 898235 on November 20, 2011 23:02

    OK, so you tried the XMLTable example, or wait for someone write at the bottom for you? :)

    You must first create an object of directory Oracle pointing to the physical location of the file (must be somewhere on the db server or at a location that the db server can access on the network).
    Then, create the procedure, in this case a simple INSERT SELECT:

    SQL> create directory tmp_dir as 'c:\temp';
    
    Directory created
    
    SQL> create table zipcodes (
      2   state_abbreviation  varchar2(2),
      3   zipcode             varchar2(5),
      4   zip_code_extn       varchar2(10),
      5   city                varchar2(80)
      6  );
    
    Table created
    
    SQL> CREATE OR REPLACE PROCEDURE insertZipcodes (
      2    p_directory IN VARCHAR2
      3  , p_filename  IN VARCHAR2
      4  )
      5  IS
      6  BEGIN
      7
      8    INSERT INTO zipcodes (state_abbreviation, zipcode, zip_code_extn, city)
      9    SELECT state_abbreviation
     10         , zipcode
     11         , zip_code_extn
     12         , city
     13    FROM XMLTable('/Zipcodes/mappings'
     14           passing xmltype(bfilename(p_directory, p_filename), nls_charset_id('AL32UTF8'))
     15           columns state_abbreviation varchar2(2)  path 'STATE_ABBREVIATION'
     16                 , zipcode            varchar2(5)  path 'ZIPCODE'
     17                 , zip_code_extn      varchar2(10) path 'ZIP_CODE_EXTN'
     18                 , city               varchar2(80) path 'CITY'
     19         )
     20    ;
     21
     22  END;
     23  /
    
    Procedure created
    
    SQL> exec insertZipcodes('TMP_DIR', 'xml_new_cities.xml');
    
    PL/SQL procedure successfully completed
    
    SQL> commit;
    
    Commit complete
    
    SQL> select * from zipcodes;
    
    STATE_ABBREVIATION ZIPCODE ZIP_CODE_EXTN CITY
    ------------------ ------- ------------- ---------------
    CA                 94301                 Palo Alto
    CO                 80323   9277          Boulder
     
    
  • Insert rows checked in the table

    Hi all
    How to insert rows checked in another table. I've created an interactive report with the query as follows
    Select apex_item.checkbox(1,id,'unchecked') ", Column1, Column2 from table. Now when I check the boxes to check off and hit the Insert button it should get stored in another table in DB (table1).

    Process:
    DECLARE
    IDX number;
    BEGIN
    BECAUSE me in 1.APEX_APPLICATION. G_F01. COUNTY
    LOOP
    IDX: = apex_application. G_F01 (i);
    Insert into step3_table (ID, TASK_NAME, TASK_DESCRIPTION, CATEGORY, TASK_INFO, TASK_STATUS, TO_WORKGROUP, IMPACT, FILE)
    values (apex_application. G_F02 (idx), apex_application. G_F03 (idx), apex_application. G_F04 (idx), apex_application. G_F05 (idx), apex_application. G_F06 (idx), apex_application. G_F07 (idx), apex_application. G_F08 (idx), apex_application. G_F09 (idx), apex_application. G_F10 (idx));
    END LOOP;
    END;

    Thanks for the help!

    Hello

    You don't have a F02 - F04 berries in your query.
    Even you, your insert statement do not have enough source columns.
    Also I do not know you could get all the data tables in this way... table F01 value maybe not array index value.

    Try

    BEGIN
      FOR i in 1..APEX_APPLICATION.G_F01.COUNT
      LOOP
    
        INSERT INTO step3_table (ID,TASK_NAME,TASK_DESCRIPTION,CATEGORY,TASK_INFO,TASK_STATUS,TO_WORKGROUP,IMPACT,FOLDER)
        SELECT id,column2,column2,column3,column4,column5,column6,column7,column8
        FROM table
        WHERE id = apex_application.G_F01(i)
        ;
    
      END LOOP;
    END;
    

    Kind regards
    Jari

  • How to know the last inserted rows (database 10g)

    Dear administrators,

    could you please tell me how to query a table and even inserted datetime?

    in fact, I have a table and I need to know the date and the last inserted rows.

    The database is 10g

    Thanks in advance

    Elijah

    Published by: user644597 on January 8, 2009 14:17

    Published by: user644597 on January 8, 2009 14:17

    Seems very late right now.
    You can take a look at the standard function SCN_TO_TIMESTAMP (doc link below), but be aware, the results are NOT 100% guaranteed to be right:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions142.htm#SQLRF06325

    Nicolas.

  • inserting rows into a single column million

    I saw 494020 table rows, and then I added a sr_no column, I want to insert the the number of (1 to 494020) in this column can tell everything. ?

    How can insert using rownum.

    UPDATE my_table SET column1 = ROWNUM;
    
  • Need help to insert rows in the table to a custom table area

    Hi all

    I have a requirement as below.

    I have a page of the i invoke a popup search page and displaying the table data in the area of the table, this table I select lines and pressing the button and given in the basic page in the region of the table being filled, of data, I need to insert these lines into a custom table. Please help me how to achieve this. Basically, I need to insert rows from one table to a custom table region.

    Thnaks

    Hello

    Review the link, below, may be it will help you:

    https://forums.Oracle.com/thread/953885

    https://forums.Oracle.com/thread/2151775

    Please share your solution here, it will help others.

    Concerning

    Mahesh

  • HFM - inserting rows data form

    Is it possible to easily insert a line when you create a data form in HFM? While I've built simple data forms, my first attempt at building a data with several separate lines form was painful because I can't understand how to insert a line in the middle of the other lines.

    The only faster alternative, that I found was to change the numbers on the "Script" tab, but who also gets inefficient when I need to add a line to the top of a data line 100 form.

    I would appreciate any advice on how to create forms of data more effectively.

    Thank you!

    M.

    One might think that there is a better way, right? Nope...

    I put together a quick and dirty excel file to renumber the lines / columns in the view script...

    #1-open the form in the editor
    #2-go into Script mode
    #3-jump to the right place in the file and insert rows or columns (NOTE: when you add the row or the column give a number such as C1 or R1.) It should not be a correct number, there must be a number so that my macro excel recognizes the renumbering...)
    #4-copy / paste the script into the Excel file in the data column of the Original form
    #5-copy / paste the column "Becomes the Output" in the script of the web form box in HFM.

    NOTE: I didn't feel bored enough to fix the substitution line and column numbers! If you add lines between a range that you override in forms, you will need to adapt them accordingly.

    http://www.charlescbeyer.com/HFM_Form_Renumbering_Tool.xls

    Published by: beyerch2 on March 1st, 2013 14:52

  • Error inserting rows in ADF object view by programming

    Hi try to insert rows from one different view to the other, following this example http://howtolearnadf.blogspot.com/2012/10/insert-rows-in-to-adf-view-object.html some how am not able to read my reviews I got the error in this ViewObject targetVO line = obj.getViewObject (); When I click on my button Add. I am jedeveloper 11.1.1.6.0 I created the public class UpdAppModuleImpl in my module of the application, I can see the view
    my log error is
    Caused by: java.lang.NullPointerException
         at OrgDetails.updAddMember(OrgDetails.java:1491)
         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)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
         at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)
         at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
         at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:402)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         ... 38 more
    this is my code
        public void updAddMember(ActionEvent actionEvent) {
            // Add event code here...
            //Code to get the bindings for TargetVO :
               
                    DCBindingContainer bindings2 =
                       (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                        
                   JUCtrlHierBinding obj = (JUCtrlHierBinding)bindings2.findCtrlBinding("UpdAddedMember1");
                   ViewObject targetVO = obj.getViewObject();
    
    
              DCBindingContainer bindings =
                       (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding empIter =
                       bindings.findIteratorBinding("UpdAddedMember1Iterator");
    
            //SourceVO1Iterator is the iterator under Executables section for the SourceVO1 bindings.
    
                   RowSetIterator roleRSIters = empIter.getRowSetIterator();
                   RowSetIterator rs1 = roleRSIters.getRowSet().getViewObject().createRowSetIterator(null);
                   NameValuePairs nvp = null;
    
                   while (rs1.hasNext()) {
                       Key key = rs1.next().getKey();
                       Row r = rs1.getRow(key);           
                      
                       nvp = new NameValuePairs();
                       nvp.setAttribute("Username",r.getAttribute("Username"));
                       nvp.setAttribute("Firstname",r.getAttribute("Firstname"));
                       nvp.setAttribute("Surname",r.getAttribute("Surname"));
                       nvp.setAttribute("Emailaddress",r.getAttribute("Emailaddress"));
                       targetVO.createAndInitRow(nvp);
                    }
                  
                   rs1.closeRowSetIterator();
                   targetVO.getApplicationModule().getTransaction().commit();
        }
    }
    Published by: adf009 on 02/08/2013 11:17

    Edited by: adf009 2013-02-08 11:22

    adf009, a simple NPE?
    You know how to use a debugger?
    You already know that

                   JUCtrlHierBinding obj = (JUCtrlHierBinding)bindings2.findCtrlBinding("UpdAddedMember1");
    

    Returns a null value. What is the information you get from that?
    He told me that you misspelled the name of link 'UpdAddedMember1' or it does not exist in the page links.

    Then, you use "links" and "bindings2", which are equal. Meanaing you only need one of them.

    What is this code before:

    while (rs1.hasNext()) {
                       Key key = rs1.next().getKey();
                       Row r = rs1.getRow(key);
    ...
                      
    

    you are iterating over a set of rows with the rs1.next () and then jump to the already selected line by setting the line with row.getRow (key);

    while (rs1.hasNext()) {
                       Row r = rs1.next();
                      
    

    should do.

    Timo

  • How to INSERT INTO a specific line?

    I have a form with a calendar on the top, below is a list of items to each with a checkbox.

    This is a wonderful Visual-

    Calendar

    Box | Col | Col | Col

    Box | Col | Col | Col

    Box | Col | Col | Col

    I want so you select the date and it passed into the database on the same line as that (definitely a multiple is better) that has been verified by the user.

    I was trying an INSERT INTO statement with a WHERE statement, but apparently you can do. So if I can use a WHERE with INSERT IN, how can I identify which line to insert the info?

    It is currently passing dates, but it creates a new line.

    I didn't post the code is neccisary power for this question, but if anyone wants to see what it let me know and I'll post it.

    Thank you!

    An INSERT operation will be * always * do exactly that, insert rows in a table.  It's sounds like maybe you should do a UPDATE operation instead.  Can you give a little more explanation on the design of database and table that represents each row of the table?  Maybe that walk through the interaction of the user more too?  And including the corresponding code is generally useful.

    -Carl V.

  • Impossible to insert rows in the table

    My insert statement below is not correct, when I try to run, his encoutering error "table or view does not exist.

    Basically what I'm doing here collects the table name in THE variable that stores the name of the table in this variable. This variable, I use as a table. I know that's not the right way, please let me how can I insert rows in the complete table with the following code.

    DROP TABLE TEMP;
    CREATE TABLE TEMP AS SELECT * FROM model WHERE 1 = 2;
    DECLARE
    I HAVE INTEGER DEFAULT 1;
    S VARCHAR2 (50);
    Start
    for C (select TABLE_NAME IN s from USER_TABLES where TABLE_NAME like '% of the CABLE' and TABLE_NAME NOT like '% OLD' and the order of 0 > Num_ROWS by TABLE_NAME) loop
    INSERT INTO TEMP SELECT * FROM c.TABLE_NAME;

    dbms_output.put_line (c.table_name);
    end loop;
    end;



    The insert statement above is not correct. How can I write good way.

    Thank you.

    Best regards
    Arshad

    user13360241 wrote:
    My insert statement below is not correct, when I try to run, his encoutering error "table or view does not exist.

    Basically what I'm doing here collects the table name in THE variable that stores the name of the table in this variable. This variable, I use as a table. I know that's not the right way, please let me how can I insert rows in the complete table with the following code.

    DROP TABLE TEMP;
    CREATE TABLE TEMP AS SELECT * FROM model WHERE 1 = 2;
    DECLARE
    I HAVE INTEGER DEFAULT 1;
    S VARCHAR2 (50);
    Start
    for C (select TABLE_NAME IN s from USER_TABLES where TABLE_NAME like '% of the CABLE' and TABLE_NAME NOT like '% OLD' and order > 0 Num_ROWS of TABLE_NAME) loop
    INSERT INTO TEMP SELECT * FROM c.TABLE_NAME;

    dbms_output.put_line (c.table_name);
    end loop;
    end;

    The insert statement above is not correct. How can I write good way.

    Thank you.

    Best regards
    Arshad

    STMT: = "INSERT INTO TEMP SELECT * FROM ';"

    STMT: = STMT. S;
    IMMEDIATELY EXECUTE STMT;

  • How to insert multiple lines using a single query

    Hi all

    How to insert multiple lines using a single query to the emp table?
    I have the number of rows to insert into table x. consumes a lot of time. I tried to insert several lines using a single query, but get errors. I know exactly the query to do this.


    Thank you
    Sunil

    Like this?

    SQL> create table test(id number , dt date);
    
    Table created.
    
    SQL> insert into test values(&a,&b);
    Enter value for a: 1   --- It asked me and I entered 1
    Enter value for b: sysdate  --- It asked me and I entered sysdate
    old   1: insert into test values(&a,&b)
    new   1: insert into test values(1,sysdate)
    
    1 row created.
    
    SQL> 
    

    g.

  • How to insert a pdf or jpeg image into a column of type blob of a table

    How to insert a pdf or jpeg image into a column of type blob of a table

    Hello
    Try this

    Loading an image into a BLOB column and showing through OAS
    -------------------------------------------------------------

    The steps are:

    Step 1.
    -------

    Create a table to store BLOBs:

    create BLOB table objects
    (id VARCHAR2 (255),)
    blob_col blob
    );

    Step 2.
    -------

    Create a logical directory in the database to the physical file system:

    create or replace the MY_FILES directory as "c:\images";

    Step 3.
    -------

    Create a procedure to load the BLOB from the file system by using the logic
    Directory. Gif 'aria.gif' must exist in c:\images.

    create or replace procedure insert_img as
    f_lob bfile.
    b_lob blob.
    Start
    insert into BLOB ("MyGif", empty_blob()) values
    return blob_col in b_lob;

    f_lob: = bfilename ("MY_FILES', 'aria.gif');
    DBMS_LOB. FileOpen (f_lob, dbms_lob.file_readonly);
    DBMS_LOB. LoadFromFile (b_lob, f_lob, dbms_lob.getlength (f_lob));
    DBMS_LOB. FileClose (f_lob);
    commit;
    end;
    /

    Step 4.
    -------

    Create a procedure that is called via Oracle Application Server to display the
    image.

    create or replace procedure get_img as
    vblob blob.
    raw buffer (32000);
    buffer_size integer: = 32000;
    offset of an integer: = 1;
    length of number;
    Start
    owa_util.mime_header('image/gif');
    Select blob_col from vblob of blobs where id = 'MyGif. "
    Length: = dbms_lob.getlength (vblob);
    While offset< length="">
    DBMS_LOB. Read (vblob, buffer_size, offset, buffer);
    HTP. PRN (utl_raw.cast_to_varchar2 (buffer));
    offset: = offset + buffer_size;
    end loop;
    exception
    while others then
    HTP.p (SQLERRM);
    end;
    /

    Step 5.
    -------

    Use the PL/SQL cartridge to call the get_img procedure

    OR

    Create this procedure in function and call it your PL/SQL code for
    correctly place the images on your HTML page through the PL/SQL Toolbox.

    from a html form

    1. create an HTML form where the image will be. You too
    need the file MIME type.
    2. create a procedure receives the form parameters. The file field will be a Varchar2
    parameter, because you receive the path of the image is not the image itself.
    3 insert the image file into the table by using 'Create a directory NAME as chemin_image' and
    Then use ' insert into the TABLE (row, BLOB_OBJECT, MIME_OBJECT) values (sequence.nextval, '.
    EMPTY_BLOB() 'GIF' or 'JPEG') BLOB_OBJECT, in the variable_blob, back
    variable_consecutive.
    4 load the file into the table using:
    DBMS_LOB. LoadFromFile (variable_blob, variable_file_name, dbms_lob.getlength (variable_file_name));
    DBMS_LOB. FileClose (variable_file_name);
    engage.

    Kind regards
    Simma...

Maybe you are looking for