Multiple record update extension issue (felixone

I just purchased the Multiple Records at Once Extension by
Felixone. I have put it to good use but have noticed an issue with
it. PHP MySQL.
I am using Dreamweaver 8 with the Repeat Region behaviour,
and the Recordset Navigation Bar, along with the extension to
update multiple values at once from a recordset.
If there are more records than can be displayed on the first
page of navigation. E.g. Showing records 1-10 of 15, when doing a
multiple table update (in this case changing a single value from 0
to 1 and vice versa) a MYSQL error comes up. The operation is still
completed but it doesn't go to the page specified after the update
in the extension, but stays on the current page with the following
error at the top:
You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to
use near '' at line 1
In the mean time, to overcome the issue, I am able to display
all records on a single page, however once the records build up it
won't be acceptable to have a potentialy very long list of records
when I would like to display only 15 at a time.
Has anyone had any experience of this, and if so would you be
willing to help me. I have emailed felixone but I need this sorting
out ASAP.
Notice I have changed the show results to 5000, as going into
the repeat region behaviour and saying 'show all' would not do
anything. It always put it back to ten.

Thank you Anurag,
I have already the db created ,
My question is how best to get the users local time
availability into the
database, what is the best method to use, should I use list
menus, etc, has
any one had to do this in a project before.
and then when some one comes to my site i want them to be
able to compare
the time stored with the time of the site users country
locally using an if
else statement. i am using asp vb and sql server
regards
kenny
"Anurag" <[email protected]> wrote in message
news:e58mta$kbg$[email protected]..
> Well basically first you have to collect:
> a, the users phone number
> b, the "display times"
>
> and store those values in a database - don't even think
about NOT using
> one
>
> Then you simply check when the page is called whether
the current time
> is within the display time...
>
> Oh, btw you probably have to think about which time you
are talking about:
>
> the mobile phone owner's local time, the viewer's local
time, your
> server time...
>
> That should do the trick...
>
> Anurag
>
>
>
> twocans wrote:
>> hello,
>> I am looking to give my user a "show my phone
number" option to show his
>> mobile phone number online and at selected times by
that user, I need to
>> create a page that will allow my user to apply this
as best and as easy
>> as
>> possible, my users are unaversial based. how best
can I do this, is thre
>> a
>> snippet out there that anyone knows that may help. I
am willing to pay if
>> any one knows of such suitable code.
>>
>> regards
>>
>> kenny
>>
>>

Similar Messages

  • Multiple record update in TABLE Control.

    Hi All,
    I m developing dialog program with table control.
    I want to know how to update multiple records through the table control if user selects more than one.
    Also depending on some condition i want to change the status of one reocrd and not the column as a display field and won't be editable. I have tried with loop at screen and modify screen, but it is showing the whole column as display only.
    ANy solution let me know

    Hi,
    pls chk this standard pgms.
    for examples on table control
    demo_dynpro_tabcont_loop
    demo_dynpro_tabcont_loop_at
    RSDEMO_TABLE_CONTROL
    chk a sample code.
    DATA :BEGIN OF int_table OCCURS 0,
           fld1 TYPE ztable-fld1,
            fld2 TYPE ztable-fld2,
            fld3 TYPE ztable-fld3,
            chk(1),
          END OF int_factor.
    *write the blow code in PAI
    LOOP AT int_table WHERE chk = 'X'.
    *modify the data base table
    MODIFY ztable FROM  int_table. "from header
    clear int_table
    ENDLOOP.
    regards
    Anver

  • Multiple Records Data Merge issue

    Hi all, could really use some help here, I've been trying to solve this for hours now:
    Made 3 different designs for labels that I'm printing based off of Avery label templates for InDesign. When I go ahead to do my data merge on any of them, I select "Multiple Records" under Records per Document Page, but the preview and the actual creation just spit out a single unique label onto each new page. For example, I'm using 2x4" labels on 2 of these, so it should print 10 per page, but instead of putting 10 unique labels on a page, it puts each new label on a new page. Therefore, instead of 100 pages for the 1,000 labels I'm printing, I end up with 1,000 pages.
    I know to double check the size constraints on the text box and make sure it fits when duplicated, and to my understanding, that is looking like it's fine. I'm also fairly certain that the CSV files I'm using are in the right format, too. I'm pretty stuck at this point as to what I need to do to fix this problem, any guidance would be awesome. Below are screenshots of what I'm looking at, please let me know if there's anything else I can provide that would help diagnose the problem.

    I thinnk the easiest way to deal with this would be to make sure all the template information from Avery is on the master page. Leave it active while you do the layout in the upper left position ON THE DOCUMENT PAGE, then assign the None master to leave nothing showing but your placholders and added art.
    Reassign the template master after the merge.

  • Urgent Help in JSP for multiple records update

    I have a Order Placement form for the dealers. Here they place their orders online and submit the form. The details they enter are stored in Orders table in a database. This order is sent for processing. This is an external operation for the users of our products.
    This table has two extra fields AccptNo and DelDate, which are filled in by the Admin of the Stores Dept of our company. The Admin then logs in and views the new orders. He sees the new orders displayed in the following format. The data shown is from the Orders table.
    He is then reqd to just fill in the Accpt No and Del Date against the requisite Order.
    Having finished filling up all the details he clicks the Submit button which updates the Orders table. i.e the existing records are updated with the accptno and del dates or rather the records are overwritten.
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>New Page 1</title>
    </head>
    <body>
    <p><b><font size="3" face="Arial Unicode MS" color="#FF0000">Orders - Admin
    Page.</font></b></p>
    <b><font size="2" face="Verdana" color="#0000FF">
    Following are the new pending orders.</font></b>
    <form method="POST" action="updtOrd.jsp">
    <div align="center">
    <center>
    <table border="1" cellspacing="0" width="68%" bordercolor="#000080">
    <tr>
    <td width="13%" align="center"><font size="2" face="Arial Unicode MS"><b>Dealer
    Id</b></font></td>
    <td width="11%" align="center"><font size="2" face="Arial Unicode MS"><b>Product</b></font></td>
    <td width="13%" align="center"><font size="2" face="Arial Unicode MS"><b>Quantity</b></font></td>
    <td width="10%" align="center"><font size="2" face="Arial Unicode MS"><b>Value</b></font></td>
    <td width="53%" align="center"><font size="2" face="Arial Unicode MS"><b>Acceptance
    No.</b></font></td>
    <td width="53%" align="center"><font size="2" face="Arial Unicode MS"><b>Delivery
    Date</b></font></td>
    </tr>
    <tr>
    <td width="13%"><font size="2" face="Verdana">d0116033</font></td>
    <td width="11%"><font size="2" face="Verdana">ABC</font></td>
    <td width="13%"><font size="2" face="Verdana">100</font></td>
    <td width="10%"><font size="2" face="Verdana">100000</font></td>
    <td width="53%"><input type="text" name="T1" size="20"></td>
    <td width="53%"><input type="text" name="T6" size="20"></td>
    </tr>
    <tr>
    <td width="13%"><font size="2" face="Verdana">d0116065</font></td>
    <td width="11%"><font size="2" face="Verdana">XYZ</font></td>
    <td width="13%"><font size="2" face="Verdana">160</font></td>
    <td width="10%"><font size="2" face="Verdana">16000</font></td>
    <td width="53%"><input type="text" name="T2" size="20"></td>
    <td width="53%"><input type="text" name="T5" size="20"></td>
    </tr>
    <tr>
    <td width="13%"><font size="2" face="Verdana">d0116058</font></td>
    <td width="11%"><font size="2" face="Verdana">PQR</font></td>
    <td width="13%"><font size="2" face="Verdana">300</font></td>
    <td width="10%"><font size="2" face="Verdana">3000000</font></td>
    <td width="53%"><input type="text" name="T3" size="20"></td>
    <td width="53%"><input type="text" name="T4" size="20"></td>
    </tr>
    <tr>
    <td width="153%" colspan="6">
    <p align="center"><input type="submit" value="Submit" name="B1"></td>
    </tr>
    </table>
    </center>
    </div>
    </form>
    </body>
    </html>
    I hope this makes the scene clear still you may eat my head for more clarifications but please help me.
    Can mail me at [email protected]
    ThanQ

    Name your textfields for accetance number and del date as your primary key that must be dealer id in your case.
    You can do this by writing <input type=text name=<%=<something>%>>
    Then you can get all the parameters in jsp to which you are going to submit your request by using function getParameterNames(). That will return you all the primary keys posted as name of your textfield. Then get the parameter value from parameter name and run the sql.

  • Update multiple records using checkbox

    Hi All,
    I have one requirement related to multiple record update using checkbox.
    HTML form has 6 columns and many rows.
    Now i want to update all 6 columns in the table for selected checkbox.
    Can any body give me some idea/code about this.
    Thanks in advance.
    Ravi

    I did not understand your idea.
    multiple columns can be updated as follows...
    update table set col1=value,col2=value,col3=value where conditions;
    We are using adodb driver in our environment. So I will explain concern to it. Store all the form new values in $var array and you can pass this $var to query execution.
    A vague idea
    $rs = $conn->Execute($update_sql,$var);     
    if ($rs===false) die('DB Error: '. $conn->ErrorMsg() );

  • Update multiple records from a list

    Just trying to find some tutorials on how to update multiple
    records from 1
    page of checkboxes
    easiest example is hotmail
    i would like to be able to give my clients the ability to
    delete or update
    multiple records from 1 page... mind you that this type of
    update woudl only
    be for simple status changes, flags that need to be changed
    and so on...
    Delete... well if they made it to this page they are already
    sure and have
    been warned that they are going to delete the records..
    where can i find such a tutorial on how to complete multiple
    record updates
    or deletes from 1 form...
    thanks

    Server model and software below.
    And hotmail has nothing to do with anything.. its an example
    of what i would
    like to be able to do...
    If you log into hotmail. you have the option to check all the
    emails you
    want to delete.
    well thats what i want to do with my clients sites...
    Each record would have its own checkbox, they select the
    records they want
    to delete or update and they hit submit to process there
    request.
    Using ASP, SQL2005 and DW8
    "bregent" <[email protected]> wrote in
    message
    news:f21upb$nop$[email protected]..
    > >Just trying to find some tutorials on how to update
    multiple records from
    > >1
    >>page of checkboxes
    >
    > What server model?
    >
    >>easiest example is hotmail
    >
    > What does hotmail have to do with this.

  • Updating Multiple Records in php

    I just can't get my head around it. Surely this is so often
    wanted that Dreamweaver should have it as standard, anyway.
    I show a list and want to make the valid_com change from 0 to
    1 on multiple records which have checkboxes.
    Are there any tutorials out there to do this with php? I
    can't seem to find a good one anywhere. There is a felixone
    extension that does it for €39 but I find this a little
    expensive for what should be very simple.
    Any help most appreciated. If anyone out there could write an
    easy to follow tutorial for this I'm sure it would get MANY
    hits.

    anyone, anyone? My deadline is looming...

  • ME01 LSMW multiple record for same material issue.

    Hi Experts,
    I have an issue with multiple record for the same material and plant when I upload the data from the file.  Lets I have the records.
    Material        Plant              Start date      Enddate        Vendor          Porg.
    1     0010     20060101     99991231     2     0010
    1     0010     20060101     99991231     3     0010
    When I upload the above data there are 2 IDOCs created when I am using the method LSMW-IDOC method, but only last record is getting updated and the first one is not getting updated in ME01 souce list. But I am getting the success message for both IDOC in LSMW. So I am not sure how to fix this why only last record is updated and not other records??

    why do you have 2 idocs?
    wouldn't be 1 idoc with 2 items be more logical?
    1 record in structure E1EORDH
    and 2 records in structure E1EORDM
    I believe your 2 IDOCs get posted, but I think your 2nd Idoc overwrites the values entered from the first IDOC.

  • Updating multiple records

    Hi,
    Im having issues with updating multiple records.
    This query selects users in a specific unit that are inactive (ui.nf_statusid = 2) and compare it newsmail_recipient table
    select *
                        from roleuser ru, unit u, userinfo ui
                        where u.ip_unitid = ru.nf_unitid
                        and u.ip_unitid = unit_id
                        and ui.ip_userid = ru.nf_userid
                        and ui.nf_statusid = 2
                        and n_internal = 0
                        and ui.ip_userid  in (select user_id
                                                   from newsmail_recipient
                                                  where user_id = ui.ip_userid
                                                    and nf_listid = liste
                                                    and nf_statusid = 1;the second script will set the users to inactive in newsmail_recipient that are inactive in the userinfo table.
    update newsmail_recipient
                 set nf_statusid = 2
                  , d_modified = sysdate
                 where user_id = ui.ip_userid;I would like to know if its possible to merge this query. I know its possible for insert but havent tried update before.
    This is how i do it, but its not working.
    case when (select *
                        from roleuser ru, unit u, userinfo ui
                        where u.ip_unitid = ru.nf_unitid
                        and u.ip_unitid = unit_id
                        and ui.ip_userid = ru.nf_userid
                        and ui.nf_statusid = 2
                        and n_internal = 0
                        and ui.ip_userid  in (select user_id
                                                   from newsmail_recipient
                                                  where user_id = ui.ip_userid
                                                    and nf_listid = liste
                                                    and nf_statusid = 1)
            then update newsmail_recipient
                 set nf_statusid = 2
                  , d_modified = sysdate
                 where user_id = ui.ip_userid;
            end;thanks guys...
    regards,
    j

    Table structure:
    newsmail_recipient:
    IP_RECIPIENTID     NUMBER(8,0)
    NF_LISTID             NUMBER(8,0)
    NF_STATUSID     NUMBER(8,0)
    D_CREATED     DATE
    D_MODIFIED     DATE
    C_NAME             VARCHAR2(100 CHAR)
    C_EMAIL             VARCHAR2(256 CHAR)
    USER_ID             NUMBER(10,0)
    NEWSMAIL_ID     NUMBER(10,0)userinfo:
    IP_USERID             NUMBER(10,0)
    NF_STATUSID     NUMBER(10,0)
    N_INTERNAL     NUMBER(1,0)@jeenesh:
    I tried your query but i get this error:
    Error(510,30): PL/SQL: ORA-00904: "UI"."IP_USERID": invalid identifierJust wondering why, but ui.ip_userid is declared.
    Actually, this is a package script.
    procedure edit_recipient_to_newsmaillist(unit_id IN NUMBER)
            as
            liste number;
            --Finner alle toppfoldere til de lukkede brukergruppene som uniten har tilgang til
            cursor closed_user_group is
              select element_id
               from admin_unit_content_access
              where group_id = 97
                and accesstype_classification_id in( select classification_id
                                                      from dynamic_field_value
                                                      where key = 'closed_user_group'
                                                       and dynamic_field_grouping_id = (select dynamic_field_grouping_id
                                                                                          from unit
                                                                                         where ip_unitid = unit_id))
              and element_type = 'f'; 
          begin
            --Finner hvilken liste folderen tilh�rer
           for u in closed_user_group loop
              if (u.element_id = 39464) then
              liste := 2017; --AMG
              elsif (u.element_id = 36664) then
              liste := 2018; --Das wird meiner
              elsif (u.element_id = 34011) then
              liste := 2019; --Junge sterne   
              elsif (u.element_id = 68359) then
              liste := 2020; --Service vorteilskarte 
              elsif (u.element_id = 1030675) then
              liste := 2021; --TGC
              elsif (u.element_id = 41741) then
              liste := 2022; --Truckworks
              elsif (u.element_id = 118659) then
              liste := 2481; --CRM
              elsif (u.element_id = 122982) then
              liste := 2479; --Vitoecell
              else
              liste := 2037; --Sneak Drive
              end if;
            --oppdater til brukerene i den uniten i listen
               merge into newsmail_recipient nm
                using
                 (select *
                  from roleuser ru, unit u, userinfo ui
                  where u.ip_unitid = ru.nf_unitid
                  and u.ip_unitid = unit_id
                  and ui.ip_userid = ru.nf_userid
                  and ui.nf_statusid = 2
                  and n_internal = 0)
                on (nm.user_id = ui.ip_userid)
                when matched then
                   update set nm.nf_statusid = 2,
                              nm.d_modified = sysdate; 
          liste := 0;
          end loop;
        end edit_recipient_to_newsmaillist;
       

  • Updation/insertion of multiple records simultaneously using check box

    Hi,
    I am using Jdev11.1.1.2.0 version. I have the following scenario.
    There is a table in the view.At run time, I need to select multiple records and update those records in the database. So i took check Box as a column in the table.*(I did not associate check box to any of the attributes (columns) in the table.)* After running the application, I selected multiple records using checkbox and submitting them. The check box is returning value as 'false' even for the selected records also instead of 'true'. Because of this we are facing the issue in updating only the selected records. Please suggest your valuable inputs.
    I have written the following code in the backing bean to get the selected rows.
    BindingContainer bindings =BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcIter= (DCIteratorBinding) bindings.get("PttDeliverabvleTrackerEOView2Iterator");
    RowSetIterator depRSIter = dcIter.getRowSetIterator();
    depRSIter.setRangeSize(depRSIter.getRowCount());
    Integer key = depRSIter.getRowCount();
    System.out.println("No of rows is "+ key);
    int rowIndex =0;
    for(int i =0; i<key; i++){
    PttDeliverabvleTrackerEOViewRowImpl row = (PttDeliverabvleTrackerEOViewRowImpl) depRSIter.getRowAtRangeIndex(i);
    System.out.println("Check box value2 "+ this.getSbc1().isSelected());
    if(this.getSbc1().isSelected()){
    rowIndex = i;
    System.out.println("Row Index: "+ rowIndex);
    Please let me know if it is it possible to associate a checkbox to any of the attributes while dragging and dropping the table in the view and update the records?
    I tried selecting the option 'Row Selection' while dragging and dropping the table and changed the property RowSelection->multiple. But it is not serving the purpose of updating multiple records.
    Please suggest if there is any other solution to update multiple records.
    Regards,
    Sreelatha.

    Hi,
    if you added checkboxes to a table, then at runtime the checkbox is stamped, which means that a call to this.getSbc1().isSelected() just returns the state of the last checkbox that is rendered. I don't want to go into the details of ADF Faces table rendering here, but point yu to a blog article that does what you are aiming for using ADF BC: http://sameh-nassar.blogspot.com/2009/12/use-checkbox-for-selecting-multiple.html
    Frank

  • How to update multiple records checked by check box

    I have list of items in my jsp pages and that are being generated by the following code
    and I want to be able to update multiple records that have a checkbox checked:
    I have a method to update the status and employee name that uses hibernate that takes the taskID
    as a paratmeter to update associated status and comments, but my issue is how to do it with multiple records:
    private void updateTaskList(Long taskId, String status, String comments) {
    TaskList taskList = (TaskList) HibernateUtil.getSessionFactory()
                   .getCurrentSession().load(TaskList.class, personId);
    taskList.setStatus(status);
    taskList.setComment(comments);
    HibernateUtil.getSessionFactory().getCurrentSession().update(taskList);
    HibernateUtil.getSessionFactory().getCurrentSession().save(taskList);
    <table border="0" cellpadding="2" cellspacing="2" width="98%" class="border">     
         <tr align="left">
              <th></th>
              <th>Employee Name</th>
              <th>Status</th>
              <th>Comment</th>
         </tr>
         <%
              List result = (List) request.getAttribute("result");
         %>
         <%
         for (Iterator itr=searchresult.iterator(); itr.hasNext(); )
              com.dao.hibernate.TaskList taskList = (com.dao.hibernate.TaskList)itr.next();
         %>     
         <tr>
              <td> <input type="checkbox" name="taskID" value=""> </td>
              <td>
                   <%=taskList.empName()%> </td>           
              <td>          
                   <select value="Status">
                   <option value="<%=taskList.getStatus()%>"><%=taskList.getStatus()%></option>
                        <option value="New">New</option>
                        <option value="Fixed">Fixed</option>
                        <option value="Closed">Closed</option>
                   </select>          
    </td>
              <td>               
                   <input type="text" name="Comments" MAXLENGTH="20" size="20"
                   value="<%=taskList.getComments()%>"></td>
         </tr>
    <%}%>
    _________________________________________________________________

    I solved it by making changes in the occurrence  parameter of data type ...:-)

  • I am using Windows 7 Home Premium 64-bit OS.  I've never had this problem before... today I opened iTunes and it prompted me to download the newest version.  I use iTunes all the time and have updated it multiple times with no issues.  During the installa

    I am using Windows 7 Home Premium 64-bit OS.I've never had this problem before... today I opened iTunes and it prompted me to download the newest version.  I use iTunes all the time and have updated it multiple times with no issues.  During the installation process it gave me an error message that said: 
    Runtime error! 
    Program C:\Program Files\iTunes.exe
    R0634
    An application has made an attempt to load the C runtime library incorrectly.
    Please contact the application's support team for more information.
    I quit the installation, uninstalled iTunes and rebooted my computer.  I now receive a similar message with a slight difference:
    Runtime error! 
    Program C:\Program Files (x86)...
    R0634
    An application has made an attempt to load the C runtime library incorrectly.
    Please contact the application's support team for more information.
    I did not leave anything out from the error message.  It doesn't point to a specific file, it just ends with "(x86)..."  Every time I boot up my computer, this error message pops up on my desktop.
    How do I repair this issue?  I have found multiple suggested solutions but am unsure which one is the best, and I don't want to try a bunch of different things for fear I may make the problem worse.  I would like to try and fix this myself if possible but I need to know if that is really possible or if I need to take my computer to someone for repairs.  Any suggestions will be greatly appreciated!!

    Hi lustyln,
    I'm having a little trouble understanding all of what you are trying to explain. From what I can tell, it sounds like your PC has a lot of software problems and you want to know what is supposed to be there and what isn't.
    For reference, here are your product specifications:
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&dlc=en&docname=c01893242&lc=en&product=4043282
    To get your PC software back to how it was when it was first purchased, run a system recovery:
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&dlc=en&docname=c01867418&lc=en&product=4043282
    I hope this helps.
    ...an HP employee just trying to help where I can, but not speaking on behalf of HP.

  • Multiple records for a single transaction - Issue in LSMW

    Hi,
    i'm facing a issue in LSMW
    i have the data coming up in the flat file. the data which constitutes the single transaction consists of  data from multiple records from the flat file..
    suppose we have 10 records in the flat file... and all the 10 records related to ony  2 transactions i.e say 6 records to first transaction and next 4 records to next transaction.
    we have a direct input method to handle this data like field1 for first record, field2 for 2nd record and so on...
    while uploading, we will get all the records one by one into our source structure. My question is can we handle this scenario in lsmw? if yes, pls suggest
    Thanks in advance
    Shekhar

    Hi Kris,
    this is regarding the asset creation via AS01..
    we are getting the flat file in that way. Lets assume like this:
    suppose for one transaction we may need to fill 5 depreciation keys and for another option only 3 dep. keys we need to fill.
    then in the flat file, we can get like 5 records for first transaction i.e asset and 3 records for 2nd transaction
    Can we handle this via lsmw
    Regards
    shekhar

  • Help needed in PL/SQL for updating the column for multiple records

    Hi,
    I am new to PL/SQL and need some help. What is the most effiecient way to update some field in a table as I may need to update thousands of records. I have a coulmn groupid can have multiple records tied to it. All the records attached to some groupid have a priority field also.
    How can I update the prorityfield value for all the groupids in a profiecient way. Here is a sample data
    GroupId     Priority
    1            1
    1            2
    1            3
    1            4
    1            5
    2            1
    2            2
    2            3
    3            1Here I have three groups 1, 2, 3. Now if any group contains only one record the priority remains same e.g. groupid=3 on top. If any group contains more than one record e.g. groupid=1 & 2 I want to re-arrange the priority fields e.g. If I want to update groupid=1 now if I change the priority of 2 to 5 (make it the last) I want to rearrange the remaing records priority i.e. if 2 becomes 5 as I have 5 rows for groupid=1 then 5 becomes 4, 4 becomes 3, 3 becomes 2 and 1 remains the same.
    Same wya if I want to make the priority 1 to 3 for groupid=2 then need 2 to become 1 and 3 to become 2 etc....
    Any help is appreciated.
    Thanks

    Hi,
    You don't need PL/SQL to do this (though you can put the following in PL/SQL if you want to):
    UPDATE     table_x
    SET     priority = CASE
                   WHEN  groupid     = 1
                   AND   priority = 2
                        THEN  5
                   WHEN  groupod     = 1
                   AND   priority     BETWEEN 3 AND 5
                        THEN  priority - 1
                   WHEN  groupid = 2
                   THEN
                        CASE
                             WHEN  prioity = 1
                             THEN  3
                             ELSE  priority - 1
                        END
                 END
    WHERE     groupId          IN (1, 2)
    AND     (     priority     BETWEEN 2 AND 5
         OR     groupid          = 2
         );There are lots of different techniques that can reduce your coidng: for example, the nested CASE statement used for groupid=2 above.
    You could do several smaller UPDATEs (for example, one just for groupid=1). Execution will be slower, but coding and testing will be faster.
    You could make the "magic numbers" 2 (for groupid=1) and 1 (for groupid=2) variables, even outside of PL/SQL.
    If you need more help, post the information that Satyaki requested.

  • Problem in UPDATE statement In Multiple Record Block

    Hi Friends,
    I have problem in update Statement for updating the record in multiple record data Block.
    I have two data Block the master block is single Record block and the 2nd data block is Multiple Record data Block.
    I am inserting the fields like category,and post_no for partiular job in single data block
    Now in second Multiple Record Data Block,i am inserting the multiple record for above fileds like no. of employees work in the position
    There is no problem in INSERT Statement as it is inerting all record But whenever i want to update particular Record (in Multiple Block) of employee for that category and Post_no
    then its updating all the record.
    my code is Bellow,
    IF v_count 0 THEN
    LOOP
    IF :SYSTEM.last_record 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
    VALUES(g_post_no, g_roster_no, g_category, :POST_HISTORY_MULTIPLE.idcode, :POST_HISTORY_MULTIPLE.joining_post_dt,
    :POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    next_record;
    ELSIF :SYSTEM.last_record = 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
    VALUES (g_post_no,g_roster_no,g_category,:POST_HISTORY_MULTIPLE.idcode,
    :POST_HISTORY_MULTIPLE.joining_post_dt,:POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    EXIT;
    END IF;
    END LOOP;
    SET_ALERT_PROPERTY('user_alert',ALERT_MESSAGE_TEXT, 'Record Updated successfuly' );
    v_button_no := SHOW_ALERT('user_alert');
    FORMS_DDL('COMMIT');
    CLEAR_FORM(no_validate);
    Please Guide me
    Thanks in advence

    As you do a loop over all the records in the block, of course every record is updated.
    Also, what you do is not the way is intended to be used. In general, you base a block on a table,then there is no need at all for writing INSERT's or UPDATE's. Forms also know's then, which records to be updated and which not.

Maybe you are looking for