Multiple Rows Update / Refresh Toplink Query when database trigger involved

Hi everybody!
I have two easy troubles for you; the platform is the same as the SRDemo Toplink version.
1.     Multiple Rows Update: I want to update with mergeEntity method, multiple rows for an isolated table; that method receives a parameter that I try to bind with the iterator "dataProvider" but it only merges the first row, not all, any other combination returns an error.
What I want to do is to have a form (like tabular forms in Apex) that lets me update multiple rows in a single page. ¿May anyone tell me how to do it?
2.     Refresh Toplink Named Query: I have a list on a page with two columns. From another page, a button does an action that fires a database trigger that updates one of the columns on the list´s page. When I go back to the list, it is not updated; however, the CacheResults´s property is set to false on the iterator.
Thanks in advance,
Alejandro T

I didn't use it (yet), but - you might take a look. You'll find a [url http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-plug-ins-182042.html]Timer plug-in on this page. It is a dynamic action which allows you to periodically fire other dynamic actions in the browser. For example use the timer to refresh a region every five minutes. You can perform any dynamic action you want using this infrastructure.So I was thinking: you might use it to run a dynamic action which would check whether something changed in that table (I suppose you'll know the way) (for example, a database trigger might set a flag in some table, timestamp or similar), and - if you find that something really changed - refresh the page.
As I said, I never used it so that's pure theory. Someone else might know better, though.

Similar Messages

  • Multiple row update; CEV business rule parameters are not refreshed

    During a multiple row update, a business rule is fired for each row.
    This change event business rule must update the value of another column in the same table (and same row).
    Unfortunately, the parameters of the BR are keeping the values of the first row that has been checked. Since my parameter p_id always keeps the same value, I always update the same row.
    Does somebody have a hint on how to solve this problem ?
    I'm using Headstart R6i and Forms6i with Oracle9i DB.
    Thanks in advance for your help,
    Denis.

    I think that's how it works. I tried that with a variable where type is Members.
    It is not showing me a prompt when i select multiple rows. However works only for first row. (even if the menu is initiated from second row).
    Multiple rows selected, variable type is members. works only for first row in selection. (in 11.1.2.2) You can try log an SR and see what Oracle has to say.
    Regards
    Celvin
    http://www.orahyplabs.com

  • Multiple Rows Update

    Hi,
    I am creating a form which will display the multiple rows from the table. Is there any way to make multiple rows update at the same time.
    If it is report generated by the query, can we do multiple rows update.
    Regards,
    Munish

    Munish,
    Sounds like what you’re looking for is a tabular form. Click on create page, then choose form, then tabular form and follow the steps of the wizard. This will create a tabular form for you that lets you update multiple rows, add new rows and delete multiple rows.
    Regards,
    Marc

  • Multiple row update of a table from another one

    Im trying to make a multiple row update with date from a different table, but it's giving me an error.
    update inv.mtl_system_items_b
    set attribute1 = t2.description,
        last_update_date = SYSDATE,
        last_updated_by = 3606
    from inv.mtl_system_items_b t2
         inner join TMP.TMP_INACTIVAR_PRODUCTOS t1
         on t2.segment2 = t1.inventory_item_id;Edited by: user8986013 on 21-may-2010 14:15

    Hi,
    Whenever you have a question involving an error message, post the complete error message, including line number. Don't you think that might help people solve your problem?
    Whneve you have any question, post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data. (In the case of a DM<L statement, like UPDATE, the INSERT statements show the tables before the change, and the results are the contents of the changed table after it.)
    Review the syntax of the UPDATE statement in the SQL Language manual:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10008.htm#sthref9598
    MERGE may be more efficient and easier to use than UPDATE.

  • Multiple Row Update in a Table

    Hi,
    How do I do a multiple row update in a single table in Oracle? I was thinking of something that is similar to the insert example below:
    Insert into SOME_TABLE (COL1, COL2) (select COL1, COL2 from ANOTHER_TABLE);
    ...wherein I don't have to write multiple lines of update statement.
    Thanks.

    Hi Mike,
    Thanks for replying. I was actually looking for a multiple row update using a single update statement. The only reason I provided an Insert statement example is to show the idea. I did some test and I was able to figure it out. I thought it was something complicated but I just had to retrieve the new values from another table and equate the primary key and foreign keys of the two tables.

  • Multiple SQL Update within Parent Query

    I am tring to extract an image from within a MS SQL image field,
    opening the image using JAI, getting the src.getWidth() & src.getHeight
    () of each item within the database, and then writing the width and
    height back into the database. Everything works except when I goto
    write the values into the database - the page (when loading) continues
    to work and work and work until I restart the tomcat service. I do not
    understand why this would occur, and what is even stranger - I have
    very similar code i used for resizing images in the database into a
    thumbnail - display and original file sizes using a similar approach...
    and that works with out a problem...
    I have tried the code with out the inner update query - it works. I
    tried with just the selection of a single specific item in the first
    query and that works, but when I try multiple updates the second query
    appears to stall.
    The code is as follows.:
    <%@ page language="java" import="javax.servlet.*,javax.servlet.http.*,java.io.*,java.util.*,java.sql.*,javax.media.jai.*,java.awt.*,java.awt.image.*,java.awt.Graphics.*,java.awt.geom.*,java.awt.image.renderable.*,javax.media.jai.widget.*,com.jspsmart.upload.*,java.net.*,com.sun.media.jai.codec.*"%>
    <jsp:useBean id="mySmartUpload" scope="page" class="com.jspsmart.upload.SmartUpload" />
    <%
         // Variables
         int count=0;
         int width                                             = 0;
         int height                                             = 0;
         String vFileName                                   = "";
         String vFileExt                                        = "";
         String vFileID                                        = "";
         String format                                        = "0";
         // Connect to the database
         Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
         Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://206.152.227.62:1433;DatabaseName=WWWBBD;User=wwwbbd;Password=bbd1412");
         //Create the statement
         Statement sqlGetPics                              = con.createStatement();
         Statement sqlUpdate                                   = con.createStatement();
         //build the query
         String qryGetPics                                   = "SELECT TOP 5 FileID, FileExt, FileName, AdjFile = CASE WHEN FullFile IS NULL THEN Display ELSE FullFile END FROM FileStore WHERE (UPPER(FileExt) = '.JPG' OR UPPER(FileExt) = '.TIF' OR UPPER(FileExt) = '.GIF' OR UPPER(FileExt) = '.BMP') AND (NOT Display IS NULL OR NOT FullFile IS NULL)";
         //execute the query
         ResultSet rsGetPics                                   = sqlGetPics.executeQuery(qryGetPics);
         // Initialization
         SmartUpload uploader                              = new SmartUpload();
         uploader.initialize(getServletConfig(),request,response);
         mySmartUpload.initialize(getServletConfig(), request, response);
         // Upload
         mySmartUpload.upload();
         while (rsGetPics.next()) {
              vFileID                                             = rsGetPics.getString("FileID");
              vFileExt                                        = rsGetPics.getString("FileExt");
              vFileName                                        = rsGetPics.getString("FileName") + vFileExt;
              width                                             = 0;
              height                                             = 0;
              uploader.fieldToFile(rsGetPics, "AdjFile", "/upload/" + vFileName);
              if (vFileExt.equalsIgnoreCase(".JPG") || vFileExt.equalsIgnoreCase(".JPEG"))
                   format                                        = "JPEG";
              else if (vFileExt.equalsIgnoreCase(".TIF") || vFileExt.equalsIgnoreCase(".TIFF"))
                   format                                        = "TIFF";
              else if (vFileExt.equalsIgnoreCase(".GIF"))
                   format                                        = "JPEG";
              else if (vFileExt.equalsIgnoreCase(".BMP"))
                   format                                        = "BMP";
              else
                   format                                        = "0";
              // update the width & height
              if (format != "0")
                   try
                        //Opens the image
                        RenderedImage src                    = JAI.create("fileload","d:\\servers\\tomcat\\webapps\\jsp\\upload\\" + vFileName);
                        width                                   = src.getWidth();
                        height                                   = src.getHeight();
                        java.io.File imageFile               = new java.io.File("d:\\servers\\tomcat\\webapps\\jsp\\upload\\" + vFileName);
                        InputStream is                         = new FileInputStream(imageFile);
                        //build the query
                        String qryUpdate                    = "UPDATE FileStore SET Width = " + width + ", Height = " + height + " WHERE FileID = " + vFileID;
                        //execute the query
                        ResultSet rsUpdate                    = sqlUpdate.executeQuery(qryUpdate);
                        %>[<%=width%>x<%=height%>:<%=vFileID%>:<%=qryUpdate%>]<BR><%
                   catch(Exception e)
                        {out.println("An error occurs : " + e.toString());}               
              count++;          
         //rsUpdate.close();
         sqlUpdate.close();
    %>
    <HTML>
    <HEAD>
         <TITLE>Repair Files</TITLE>
    </HEAD>
    <BODY>
    <%=count%> files updated in the database.
    </BODY>
    </HTML>

    BTW - I also tried this with a prepared statment query... no good.

  • I want to know number of rows updated by my query

    I want to know how many rows have been updated caused by an update query?. Does any database variable can tell me that ?

    PreparedStatment pstmt = conn.prepareStatement("my updated query");
    pstmt.setXXX
    int rowsupdated = pstmt.executeUpdate();
    rowsupdated = no of rows updated by the statement executed by this prepared statement.
    Elango.

  • URGENT!!! Can't implement a Multiple Row Update Process

    Hi All,
    I'm a total newbie to APEX and wondered if anyone could help.
    I've created an Application using the "Report and Form" template. My Table, call it tab1, has a pk called pk1 and four fields, f1, f2, f3 and f4. The Application has 3 pages, p1 is the login page, p2 is the Report and p3 the Form. The Report is fine and I've added a search on the Report based on the pk. The Below is an example of the output of a Report filtered on the value pk=3:
    PK F1 F2 F3 F4
    3 21 A C A
    3 21 B B C
    3 21 C A A
    3 21 B D A
    Each of the 4 rows above then links into a Form on P3 for updating, so if I clicked on the link for the first row the Form would like something like this:
    PK 3
    F1 21
    F2 A
    F3 C
    F4 A
    Now here's what I'm trying to achieve. I've created an "Update" button on p3 and when I press this I would simple like the below statement to be executed:
    Update Tab1
    set F4 = :P_4,
    F3 = :P_3
    where F1 = :P_F1
    where :P_1, :P_3 and :P_4 are the values inserted by the user. So basically I want to do a multi-row update based on a non-primary key. In this case I would want 4 rows updated after pressing the Update button.
    Any help would be most appreciated.
    Mits

    have you tried to download and install hp's drivers from this place?
    http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?product=3382185&lc=en&cc=us& dlc=

  • ADF JSF - Multiple Rows Update

    Does anybody if there is a new component in ADF JSF that allows update of multiple rows? Se example...
    ID     | Name | Number
    1     | textbox | textbox
    2     | textbox | textbox
    3     | textbox | textbox
    |Create- button| | Save - button|

    Sure, the ADF Faces <af:table> supports updating multiple rows: just put an <af:inputText> inside one of the columns.

  • JDBC Receiver - Multiple rows Update

    I have an interface the incoming message contain multiple columns and it has to be updated using a JDBC Receiver Adapter with its key values.
    Can we send multiple rows in a single JDBC Update Statement.
    Please advise.

    Sebin,
    No ,it's not possible to have multiple rows in single update statement. Rather you can duplicate the segment at Statement level and do the update.
    Please refer http://help.sap.com/saphelp_nw70/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    raj.

  • Multiple Row Update From Similar Table

    I am attempting to update a table based on similar table if the Entry_Type is D and they have the same log_numbers. I have created queries to show me the results I want but am having some difficulities getting the update to happen. I am getting a single-row subquery returns more than one row error, but I would like to update all necessary rows.
    Here is my sql...
    UPDATE V.MASTER
    SET (MODIFIED_BY, ENTRY_TYPE) = (
         SELECT MODIFIED_BY, ENTRY_TYPE
         FROM J.BACK)
         WHERE LOG_NUMBER IN
         (SELECT LOG_NUMBER FROM V.MASTER
         WHERE ENTRY_TYPE <> 'D' AND LOG_NUMBER = ANY
                   (SELECT LOG_NUMBER FROM J.BACK
                   WHERE ENTRY_TYPE = 'D'))
    I would appreciate any assistance! Thanks!

    You can also use correlated update. This one is from AskTom (http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1197999096334)
    if you have the proper primary keys to assure uniqueness on S and C, this does it (i have the keys
    noted in the creates)
    ops$tkyte@ORA920> create table pgp_person
    2 ( date_of_birth date,
    3 update_by varchar2(10),
    4 update_date date,
    5 load_timestamp date,
    6 person_num int );
    Table created.
    ops$tkyte@ORA920>
    ops$tkyte@ORA920> create table ship_passenger
    2 ( date_of_birth date,
    3 person_num int,
    4 voy_num int,
    5 book_num int,
    6 seq_num int,
    7 primary key (person_num) );
    Table created.
    ops$tkyte@ORA920>
    ops$tkyte@ORA920> create table pgp_cruise_history
    2 ( voy_num int,
    3 book_num int,
    4 seq_num int,
    5 matched_ind int,
    6 primary key(voy_num,book_num,seq_num) );
    Table created.
    ops$tkyte@ORA920>
    ops$tkyte@ORA920> update ( select p.date_of_birth dob1, s.date_of_birth dob2,
    2 p.update_by, p.update_date, p.load_timestamp
    3 from pgp_person p, pgp_cruise_history c, ship_passenger s
    4 where p.person_num = s.person_num
    5 and s.voy_num = c.voy_num
    6 and s.book_num = c.book_num
    7 and s.seq_num = c.seq_num
    8 and c.matched_ind is not null
    9 and s.date_of_birth <> p.date_of_birth )
    10 set dob1 = dob2,
    11 update_by = 'sdm18649',
    12 update_date = trunc(sysdate),
    13 load_timestamp = sysdate;
    0 rows updated.

  • I need to divide selected row into multiple rows when i navigate  ADF 11g

    Hi
    I'm using jdeveloper 11.1.1.2.0 with ADF 11g.
    I need to divide selected row into multiple rows when i navigate to other page . Scenario - in first page i'm displaying some records with columns like empno , empstatus , empworkdepts ,curdepts
    Here empworkdepts gives the numeric number like no of departments work shifts 3 or 4 or 5. when i select any particular employee and fire next button to navigate next page.I have to divide the selected employee with same information into multiple times based on the empworkdepts value.
    empno empstatus empworkdepts curdept
    001 eds 2 TS
    002 hr 1 FO
    003 eds 4 TS
    *004 eds 3 TS*
    now i selected employee 004 , when i navigate to next page.
    Empno EmpStatus EmpWorkDepts CurDept
    004 eds 3 TS
    004 eds 3 TS
    004 eds 3 TS
    i did with java code in bean .but not stable .
    any help............
    thanks advance.............
    Edited by: user9010551 on May 5, 2010 10:48 PM
    Edited by: user9010551 on May 10, 2010 11:31 PM

    user9086775 wrote:
    Hi Experts,
    I have a requirment where i need to fetch parts of a single row into multiple rows from a singlt Query, i am sure it is possible using Pivots but just cant figure out an approach. Any help on this is highly appriciapted.
    Requirment:
    This is a sample set record in a table
    Product     Sub Product          Name    Age
    New Car    Nissan                   Tom        49
    New Car    Nissan                   Jack         36
    Old Car      Audi                     Sam         24
    Old Car      Jaguar                  Pint          26
    Old Car      Audi                     Smith       41
    I need to be able to fetch the above data in the below fashion
    Product     Sub Product          Name    Age
    New Car
    Nissan
    Tom        49
    Jack        36
    Old Car     
    Audi            
    Sam        24
    Smith      41
    Jaguar                   Pint         26Please help with ideas as to how can i achive the above without using PLSQL.
    Thanks in advance!You should be doing this in the client on not in the DB. Use the reporting tool that you use to do this.
    For example if you are in SQL Plus you can use the BREAK command.

  • How to get multiple Rows in UCCX DB

    Hi All,
    Here is the scenario. One of customer has DB which return the multiple rows of data by querying against one Field.
    suppose there is a Field "National ID Number"  which fetches cutomers' more than one account like post paid customer , prepaid customer, corporate customer etc in different Rows then how could i check this if the customer has more than one Account system should ask about the particular Account Number.
    any help would be grateful for me.
    Thanks

    Is the following way seem correct to store values in an array var
    db read
      successful
        label get_next_record
        db get
          successful
            /* Action to store values in Array variable */
                        Array[c]=accno
    /* “accno” is a variable with Big Dec Type having all possible values fetched by multiple rows */
                        c=c+1 /* where “c” is an index var */
                        goto get_next_record
          no data
            goto no_more_records
    label no_more_records

  • How to process multiple rows of data into a single string

    Hello,
    I am trying to process multiple rows of text from an Oracle database into one field to display on a report as continuous text. Below is sample data. The text field is 55 characters wide so anything longer is broken into multiple rows. I need to recombine it for display.
    line          text
    1             IN THE N.E. QUADRANT OF THE INTERSECTION OF THE FAIRFAX
    2              COUNTY PARKWAY AND THE DULLES AIRPORT ACCESS AND THE T
    3             OLL ROAD AND SOUTH OF SUNSET HILLS ROAD
    I tried creating a formula field but it did not work, below is the code in Visual Basic syntax. I also tried using the Maximum() and UBound() functions without luck. I don't quite understand how to make the UBound() work; it threw a lot of errors.
    Dim i As Number
    Dim strLocDesc As String
    For i = 1 To count({LDS_AR_RL_COMM.ART_LINE_NUM})
        strLocDesc = strLocDesc & {LDS_AR_RL_COMM.ART_COMM_RMK}(i)
    Next i
    formula = strLocDesc
    Any ideas on how to solve this?

    Hello Allison,
    You can try this:
    Create a formula called @StoreText, place it in the details and have the following code in it:
    WhilePrintingRecords;
    Global StringVar Text1;
    Global StringVar TextRest;
    if {field.line} = 1 then
    Text1:= {field.text} else
    if {field.line} >= 2 then
    TextRest := TextRest+" "+{field.text};
    In the Group Footer you can have a formula called @GetStoreText with the following code in it:
    WhilePrintingRecords;
    Global StringVar Text1;
    Global StringVar TextRest;
    Text1+varTextRest;
    See how that works out for you.
    Regards,
    Zack

  • Urgent: How to break 1 Row into Multiple Rows

    Hi Experts,
    I have a requirment where i need to fetch parts of a single row into multiple rows from a singlt Query, i am sure it is possible using Pivots but just cant figure out an approach. Any help on this is highly appriciapted.
    Requirment:
    This is a sample set record in a table
    Product Sub Product Name Age
    New Car Nissan Tom 49
    New Car Nissan Jack 36
    Old Car Audi Sam 24
    Old Car Jaguar Pint 26
    Old Car Audi Smith 41
    I need to be able to fetch the above data in the below fashion
    Product Sub Product Name Age
    New Car
    Nissan
    Tom 49
    Jack 36
    Old Car
    Audi
    Sam 24
    Smith 41
    Jaguar Pint 26
    Please help with ideas as to how can i achive the above without using PLSQL.
    Thanks in advance!

    user9086775 wrote:
    Hi Experts,
    I have a requirment where i need to fetch parts of a single row into multiple rows from a singlt Query, i am sure it is possible using Pivots but just cant figure out an approach. Any help on this is highly appriciapted.
    Requirment:
    This is a sample set record in a table
    Product     Sub Product          Name    Age
    New Car    Nissan                   Tom        49
    New Car    Nissan                   Jack         36
    Old Car      Audi                     Sam         24
    Old Car      Jaguar                  Pint          26
    Old Car      Audi                     Smith       41
    I need to be able to fetch the above data in the below fashion
    Product     Sub Product          Name    Age
    New Car
    Nissan
    Tom        49
    Jack        36
    Old Car     
    Audi            
    Sam        24
    Smith      41
    Jaguar                   Pint         26Please help with ideas as to how can i achive the above without using PLSQL.
    Thanks in advance!You should be doing this in the client on not in the DB. Use the reporting tool that you use to do this.
    For example if you are in SQL Plus you can use the BREAK command.

Maybe you are looking for