How to test the update statement in SQLJ - Im lost and cant figure it out!

Hi Im wondering on the sytax of this logic.
//Execute an update on a table
#sql {update mytable set name = :test where today = sysdate };
//This is where im lost. how to test if the record is not found
if (record not found for update){
#sql {insert mytable set name = :test where today = sysdate };
I dont want to do a select count(*) and based on the value go to update or insert.
Does anyone know how to do it?
Thanks so much

If Software Update is offering the update then it would be compatible with your model.  Unfortunately, you haven't provided us with any information on your hardware that would enable us to determine if it really is too old.
If you really wish to disable the update alert then the next time Software Update opens, select the update in the list then select "Ignore update" from SU's Update menu.

Similar Messages

  • How to test the select statement.

    Hi All,
    How to test the select statement.
    Is there any Oracle sqlplus  or toad kind of tool to  test the query.
    thanks
    siva

    Use SQL Trace (ST05) and choose 'Explain one SQL Request'. Enter your SQL command as it should be executed in the underlying database. e.g. if the db is Oracle, the statement should be entered as:
    SELECT matnr,werks,lvorm,dispo
    FROM marc
    WHERE mandt = :a AND
                 matnr = :b AND
                 werks = :c
    In the above :a, :b and :c are place holders for the actual comparison values. You dont have to enter those values. When you choose 'Explain' button, you will find the 'Execution Plan'. The important parameter which denotes the efficiency of the SQL statement is the 'Cost'. The cost should be as low as possible. The table access should be through INDEX UNIQUE SCAN. If you get a FULL TABLE SCAN and higher cost, you need to fine-tune your statement by modifying the where clause.
    If you dont know Oracle SQL statements, execute the program in trace mode and go to the trace and you will find the underlying SQL statements issued to the database.
    Regards
    Suresh Radhakrishnan

  • How to tune the Update statement for 20 million rows

    Hi,
    I want to update 20 million rows of a table. I wrote the PL/SQL code like this:
    DECLARE
    v1
    v2
    cursor C1 is
    select ....
    BEGIN
    Open C1;
    loop
    fetch C1 bulk collect into v1,v2 LIMIT 1000
    exit when C1%NOTFOUND;
    forall i in v1.first..v1.last
    update /*+INDEX(tab indx)*/....
    end loop;
    commit;
    close C1;
    END;
    The above code took 24 mins to update 100k records, so for around 20 million records it will take 4800 mins (80 hrs).
    How can I tune the code further ? Will a simple Update statement, instead of PL/SQL make the update faster ?
    Will adding few more hints help ?
    Thanks for your suggestions.
    Regards,
    Yogini Joshi

    Hello
    You have implemented this update in the slowest possible way. Cursor FOR loops should be absolute last resort. If you post the SQL in your cursor there is a very good chance we can re-code it to be a single update statement with a subquery which will be the fastest possible way to run this. Please remember to use the {noformat}{noformat} tags before and after your code so the formatting is preserved.
    David                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to automate the updating of a dimension - both members and properties

    I need to automate the updqating of one of my dimensions in BPC 5.1 using SSIS.  I've tried the "Admin_Makedim.dtsx" that comes with the system.  It completes succesfully, but nothing is actually changed or updated in the dimension. 
    Has anyone sucessfully used this package?  If so, does it recognize (and handle) changes to properties of existing dimension members?

    I created an SSIS package that performs most of what you're looking for, including updating the XLS file.  Please note, that the entire table must be updated.  There is no way that I know of yet on how to update incrementally.
    Below is the documentation I created for the package (pictures are omitted by the blog).
    I will email you a copy of the package and the full documentation as well.
    *APPENDIX 10 REQUIRED EXCEL INPUT FILE*
    Contents
    Meta data (or master data) can be updated automatically thru a daily batch job.  A sample of the Excel file is below.  It contains all the properties defined for that dimension.  In addition, four additional system processed columns needs to be populated if this file is updated from the back-end.  They are:
    Calc – (Y/N) Is the member a calculated field?  This includes all parent members which are calculated by aggregating their children.
    DimCalc – (Y/N) Is the member a dimension calculation field? These are members that are represented by formulas, rather than entered, fed or aggregated.
    IsBaseMem – (Y/N) Is the member a Base Member, a field that is entered in manually or fed in at the lowest level of the hierarchy?
    Hir – Which hierarchies does the member belong to?  If the member belongs to multiple hierarchies, then they are listed with semicolons.  For example, a member belonging to both Parent H1 and Parent H2, would have this field filled in as:  H1;H2
    Location
    The Excel file is located at:
    C:\BPC\Data\Webfolders\[Application Name]\AdminApp\[Dimension Name].xls
    When the Excel file is to be replaced, the new one should be placed and named at:
    C:\BPC\Data\Webfolders\[Application Name]\AdminApp\[Dimension Name]_Update.xls
    SSIS PACKAGE
    Each dimension that is to be updated from the back end will have its own SSIS package for executing a back end update.
    Variables
    The package, one for each Dimension, has just four variables to configure
    AppSet – the name of the Application Set, such as Finance
    DimensionName – the name of the Dimension, such as IntCo
    InstallDirectory – the directory in which BPC was installed up to the Webfolders directory, such as  C:\BPC\Data\Webfolders\
    User_Server – the fully qualified user that will be executing the package, such as DCC\osoftadmin
    These four variables can be set rather simply within the corresponding configuration file (*.dtsConfig), or hard coded within the SSIS file itself.
    Column Mappings
    The package manually requires the columns between the Excel table and the internal BPC ‘mbr’ table be mapped to each other.  This is a rather simple click-and-drag, because the column names between the two should match.  Modifications to these mapping are only necessary when the properties are modified.
    SSIS TASK FLOW
    The SSIS package performs the following steps when executed:
    •     Backs up the original Excel file with a date stamped copy
    •     Replaces the original Excel file with the updated version
    •     Clears the corresponding internal BPC ‘mbr’ table
    •     Populates the ‘mbr’ table with the values within the updated Excel file
    •     Clears the corresponding internal BPC ‘dim’ table
    •     Performs a BPC ‘full process’, which populates the ‘dim’ table
    Logs
    Transaction logs, which specify the success (or failure) of each of the above steps, are recorded and stored at:
    C:\BPC\Data\Webfolders\[Application Name]\AdminApp\Logfile\

  • How to add the update statement in this procedure?

    I have one table usersubscription (userid,newsletterid,deleted)
    I got one string from user e.g. ('1,2,3') and userid = 14
    I wrote proceduer that will insert this records in to usersubscription table;
    userid     newsletterid     deleted
    14     1          n
    14     2          n
    14     3          n
    default value of deleted column is 'n'.
    my procedure is as follows;
    CREATE OR REPLACE PROCEDURE usersubscription_procd1 (vuserid in number, vnewsletterid IN VARCHAR2)
    AS
    I NUMBER;
    J NUMBER;
    VAL VARCHAR2(100);
    BEGIN
         I := 1;
         J := 1;
         WHILE INSTR(vnewsletterid,',',I) != 0 LOOP
         VAL := SUBSTR(vnewsletterid,I,INSTR(vnewsletterid,',',I)-J);
         I := INSTR(vnewsletterid,',',I)+1;
         J := I;
         INSERT INTO usersubscription (usersubcriptionid,userid,newsletterid)
         VALUES (usersubscription_seq.nextval,vuserid,VAL);
         END LOOP;
         VAL := SUBSTR(vnewsletterid,I,LENGTH(vnewsletterid));
         INSERT INTO usersubscription (usersubcriptionid,userid,newsletterid)
         VALUES (usersubscription_seq.nextval,vuserid,VAL);
    END;
    Now one requirement is that when new string comes for same userid e.g.('1,4,5') userid = 14
    then the deleted column for 1 and 2 newsletterid changes to 'y';
    please tell me the solution.
    Prathamesh.

    Hi,
    Before your loop, you can make something else like :
    SQL> select * from test;
        USERID NEWSLETTERID D
            14            1 n
            14            2 n
            14            3 n
    SQL> update test
      2  set deleted = 'y'
      3  where instr('1,4,5',newsletterid,1) = 0
      4  and userid = 14;
    2 ligne(s) mise(s) à jour.
    SQL> select * from test;
        USERID NEWSLETTERID D
            14            1 n
            14            2 y
            14            3 y
    SQL> HTH,
    Nicolas.

  • How to use the updated value in the same update statement

    Hello,
    I just wonder how to use the updated new value of other column in the same udpate statement. I am using Oracle 11.2, and want to update the two columns with one update statement as following:
    create table tb_test (id number(5), tot number(5), mon_tot number(5));
    update tb_test set (tot = 15, mon_tot = tot *15) where id = 1;
    ...I would like to update both tot and mon_tot column, the value of mon_tot shall be determinted by the new value of tot.
    Thanks,
    Edited by: 939569 on 1-Feb-2013 7:00 AM

    Edit: example added
    SQL> create table tb_test
      2  ( id number(5)
      3  , tot number(5)
      4  , mon_tot number generated always as (tot*15) virtual
      5  );
    Table created.
    SQL> insert into tb_test (id, tot) values (1, 5);
    1 row created.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1          5         75
    1 row selected.
    SQL> update tb_test
      2  set    tot = 15
      3  where  id = 1;
    1 row updated.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1         15        225
    1 row selected.

  • How to replace the update staement with a modify statement

    how to convert this update stat to a modify stat?
    Message was edited by:
            Ashwin A

    Hi
    MODIFY <DB TABLE> FROM <INTERNAL TABLE>
    To insert or change a single line in a database table, use the following:
    MODIFY <target> FROM <wa> .
    The contents of the work area <wa> are written to the database table <dbtab>. The work area <wa> must be a data object with at least the same length and alignment as the line structure of the database table. The data is placed in the database table according to the line structure of the table, and regardless of the structure of the work area. It is a good idea to define the work area with reference to the structure of the database table.
    If the database table does not already contain a line with the same primary key as specified in the work area, a new line is inserted. If the database table does already contain a line with the same primary key as specified in the work area, the existing line is overwritten. SY-SUBRC is always set to 0.
    A shortened form of the above statement is:
    MODIFY <dbtab>.
    In this case, the contents of the table work area <dbtab> are inserted into the database table with the same name. You must declare this table work area using the TABLES statement. In this case, it is not possible to specify the name of the database table dynamically. Table work areas with the same name as the database table (necessary before Release 4.0) should no longer be used for the sake of clarity.
    Reward points if useful
    Regards
    Anji

  • How to test the data

    Hi,,
    The below test data is for SD report which do the monthly batch transfer from Annexure to F-form
    Can you please help me how to test the data? and prepare the unit test case.
    1. Intra-plant movement of inventory between two plants with the same region Code -  In India there are two plants in the state of Maharashtra.
    Plant 8600 (Vendor 10999346) -> Plant 8601 - MM# 1003623 / 1013515 / 5214135 / 8788143
    NB PO# 6500002231 / ZU PO 4600000500
    2. Intra-plant movement of inventory from Plant 8650 - Goa to one Depot Plant
    Plant 8613 (Vendor 10999359) -> Plant 8618 - MM# 1003623 / 1013515 / 5214135 / 8788143
    NB PO# 6500002232 / ZU PO 4600000501
    3. Intra-plant movement of inventory between two Parts plants.
    Plant 8650 (Vendor 10999344) -> Plant 8601 - MM# 4908281 / 4908323 / 4908968 / 4922001
    NB PO# 6500002233 / ZU PO 4600000502

    Please  go thorugh this  ...
    eCATT stands for extended Computer Aided Test Tool (eCATT) which is built is testing tool to test SAP system. By using testing tool we can test the entire business process, and we can also use this tool with a third party testing tool (I am not covering this topic). Execution of every test script ends with a log, which explains the results of the test script. 
    By using eCATT we can do following operations,
    ·        Test transactions, reports, and scenarios
    ·        Call BAPIs and function modules
    ·        Test remote systems
    ·        Check authorizations (user profiles)
    ·        Test updates (database, applications, GUI)
    ·        Test the effect of changes to customizing settings
    ·        Check system messages
    For more information go to: eCATT::Extended Computer Aided Test Tool (sdn.com)
    Here I am discussing fundamentals about eCATT in detail. You can find very good documentation in sdn.com.
    To develop a test script in eCATT we need to follow the following steps,
    1. Creating Test Scripts.
    2. Creating Test Data Containers[16] .
    3. Understanding System Data Containers[17] .
    4. Executing Test Configurations.
    There is a very good web blog on eCATT in sdn.com which explains eCATT with necessary screen shots. To read document click here Blog on eCATT in sdn.com
    For  details  and the screenshots     please  see the  link
    http://www.erpgenie.com/sap/ecatt/
    Reward  points if it is  usefull ...
    Girish

  • How to display the updated data from db to user interface in sruts framewor

    A beginner in this area, I have been able to read a record from a
    MySQL database and populate in jsp form . Now, my goal is to
    allow the user to edit the contents of the form and then update the
    record in MySQL and then display the same in jsp. page
    The scenario in detail
    1)the data is fetched from db and displayed in non-editable format
    2)Next button is clicked
    3)Now in the same jsp page I view the same data from db in editable format
    4)The user is allowed to change the information
    5)Now update button is clicked
    6)the records are updated in the db -Finished doing till this step
    7)But the updated info in non - editable format to be displayed in jsp page is left pending.
    Here is my code for jsp,i want know how to write an action for this,tried doing the same in java and I'm successful.but what I need is how to fetch the updated information in the user interface.
    I've made both editable as well as non editable info in the same page with different actions.
    pl help me,I'm a newbie
    <%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
    <%@ page language="java" %>
    <%@ page import="java.util.ArrayList,java.util.Iterator" %>
    <%@ page import="com.finocus.common.container.CustomerDetailsTest;" %>
    <html:html>
    <head>
         <title>CUSTOMER DISPLAY</title>
    </head>
    <body>
         <table width="100%" bgcolor="darkkhaki">
         <tr>
              <td><table width="100%" bgcolor="indigo">
                   <tr>
                        <td><font color="white">Display</font></td>
                        <td><font color="white">Update</font></td>
                        <td><font color="white">Verify</font></td>
                        <td><font color="white">Confirm</font></td>
                   </tr>
                   </table>
              </td>
         </tr>
    <%
              //Container for holding data
              ArrayList list = (ArrayList)session.getAttribute("CUSTOMERDETAILS");
              Iterator itr=list.iterator();
              while(itr.hasNext())
              CustomerDetailsTest cust = (CustomerDetailsTest) itr.next();
              System.out.println("testGetCustomerDetails()-successed. retrieved CustomerDetailsTest="+cust.toString());
    %>
    <%
              //Session for checking whether edit or non-edit mode
              String pageMode = (String)session.getAttribute("CUSTOMER_PAGE_MODE");
              session.removeAttribute("CUSTOMER_PAGE_MODE");
              if(null==pageMode)
                   pageMode = "EDIT";
              if(pageMode.equals("EDIT"))
                   //display data in the form
                   System.out.println("Editable mode");
    %>
              <html:form action="/nonedit">
                   <tr>
              <td><table width="100%" bgcolor="darkkhaki">
              <tr>
                        <td><b><bean:message key="label.id"/></b></td>
                        <td><font color="red"><%=cust.getCusId()%></font></td>
         </tr><br>
         <td>
                             <font color="brown" face="Courier New"><b>
                        <bean:message key="label.Company"/></b>
                        </td><br>
                        <tr>
                   <td><bean:message key="label.cname"/></td>
                   <td><font color="blue"><html:text property="name" value="<%=cust.getCname()%>"/></font></td>
                        <td><bean:message key="label.cphone"/></td>
                        <td><font color="blue"><html:text property="phone" value="<%=cust.getCphone()%>"/></font></td>
              </tr><br>
         <tr>
                   <td><bean:message key="label.caddr1"/></td>
                   <td><font color="blue"><html:text property="address1" value="<%=cust.getCaddress1()%>"/></font></td>
                        <td><bean:message key="label.cemail"/></td>
                        <td><font color="blue"><html:text property="email" value="<%=cust.getCemail()%>"/></font></td>
              </tr><br>
         <tr>
                   <td><bean:message key="label.caddr2"/></td>
                   <td><font color="blue"><html:text property="address2" value="<%=cust.getCaddress2()%>"/></font></td>
                        <td><bean:message key="label.cfax"/></td>
                        <td><font color="blue"><html:text property="fax" value="<%=cust.getCfax()%>"/></font></td>
              </tr><br>
         <tr>
                   <td><bean:message key="label.ccity"/></td>
                   <td><font color="blue"><html:text property="city" value="<%=cust.getCcity()%>"/></font></td>
                        <td><bean:message key="label.czip"/></td>
                        <td><font color="blue"><html:text property="zip" value="<%=cust.getZip()%>"/></font></td>
              </tr><br>
         <tr>
                   <td><b><bean:message key="label.cstate"/></b></td>
                   <td><font color="red"><html:text property="state" value="<%=cust.getCstate()%>"/></font></td>
         </tr><br>
         <td>
                             <font color="brown" face="Courier New"><b>
                        <bean:message key="label.Admin"/></b>
                        </td><br>
         <tr>
                   <td><b><bean:message key="label.AAname"/></b></td>
                   <td><font color="red"><html:text property="adminname" value="<%=cust.getAname()%>"/></font></td>
         </tr><br>
         <tr>
                   <td><b><bean:message key="label.AAemail"/></b></td>
                   <td><font color="red"><html:text property="adminemail" value="<%=cust.getAemail()%>"/></font></td>
         </tr><br>
         <tr>
                   <td><b><bean:message key="label.AAphone"/></b></td>
                   <td><font color="red"><html:text property="adminphone" value="<%=cust.getAphone()%>"/></font></td>
         </tr><br>
         <td>
                             <font color="brown" face="Courier New"><b>
                        <bean:message key="label.User"/></b>
                        </td><br>
         <tr>
                   <td><b><bean:message key="label.AUname"/></b></td>
                   <td><font color="red"><html:text property="adminusername" value="<%=cust.getUname()%>"/></font></td>
         </tr><br>
         <tr>
                   <td><b><bean:message key="label.AUemail"/></b></td>
                   <td><font color="red"><html:text property="adminuseremail" value="<%=cust.getUemail()%>"/></font></td>
         </tr><br>
              <tr align="center">
                        <td><html:cancel value="Cancel"/>
                        <html:submit value="Next"/></td>
              </tr>
              </html:form>
    <%               
              }else
                   //display data in the text
                   System.out.println("Non-Editable mode");
    %>
              <html:form action="/edit">
              <tr>
              <td><table width="100%" bgcolor="darkkhaki">
                   <tr>
                        <td><b><bean:message key="label.id"/></b></td>
                        <td><font color="red"><%=cust.getCusId()%></font></td>
                        <td><b><bean:message key="label.status"/></b></td>
                        <td><font color="red"><%=cust.getStatus() %></font></td>
         </tr><br>
         <td>
                             <font color="brown" face="Courier New"><b>
                        <bean:message key="label.Company"/></b>
                        </td><br>
                        <tr>
                   <td><bean:message key="label.cname"/></td>
                   <td><font color="blue"><%=cust.getCname()%></font></td>
                        <td><bean:message key="label.cphone"/></td>
                        <td><font color="blue"><%=cust.getCphone()%></font></td>
              </tr><br>
         <tr>
                   <td><bean:message key="label.caddr1"/></td>
                   <td><font color="blue"><%=cust.getCaddress1()%></font></td>
                        <td><bean:message key="label.cemail"/></td>
                        <td><font color="blue"><%=cust.getCemail()%></font></td>
              </tr><br>
         <tr>
                   <td><bean:message key="label.caddr2"/></td>
                   <td><font color="blue"><%=cust.getCaddress2()%></font></td>
                        <td><bean:message key="label.cfax"/></td>
                        <td><font color="blue"><%=cust.getCfax()%></font></td>
              </tr><br>
         <tr>
                   <td><bean:message key="label.ccity"/></td>
                   <td><font color="blue"><%=cust.getCcity()%></font></td>
                        <td><bean:message key="label.czip"/></td>
                        <td><font color="blue"><%=cust.getZip()%></font></td>
              </tr><br>
         <tr>
                   <td><b><bean:message key="label.cstate"/></b></td>
                   <td><font color="red"><%=cust.getCstate()%></font></td>
         </tr><br>
         <td>
                             <font color="brown" face="Courier New"><b>
                        <bean:message key="label.Admin"/></b>
                        </td><br>
         <tr>
                   <td><b><bean:message key="label.AAname"/></b></td>
                   <td><font color="red"><%=cust.getAname()%></font></td>
         </tr><br>
         <tr>
                   <td><b><bean:message key="label.AAemail"/></b></td>
                   <td><font color="red"><%=cust.getAemail()%></font></td>
         </tr><br>
         <tr>
                   <td><b><bean:message key="label.AAphone"/></b></td>
                   <td><font color="red"><%=cust.getAphone()%></font></td>
         </tr><br>
         <td>
                             <font color="brown" face="Courier New"><b>
                        <bean:message key="label.User"/></b>
                        </td><br>
         <tr>
                   <td><b><bean:message key="label.AUname"/></b></td>
                   <td><font color="red"><%=cust.getUname()%></font></td>
         </tr><br>
         <tr>
                   <td><b><bean:message key="label.AUemail"/></b></td>
                   <td><font color="red"><%=cust.getUemail()%></font></td>
         </tr><br>
         <tr align="center">
                        <td><html:submit value="Update"/></td>
              </tr>
              </html:form>
    <%
    %>
    <%
    %>
                   </table>
              </td>
              </tr>
         </table>
    </body>
    </html:html>

    u r using action classes. so after calling the insert method in Action Class to a dao... the next statement should be retrieve statement. so at the time of updating first it will get updated.. the next statement it will execute is retrieve and then set these details in VO or FORM and show it on JSP
    Message was edited by:
    leo_michael

  • How to get the previous state of my data after issuing coomit method

    How to get the previous state of some date after issuing commit method in entity bean (It should not use any offline storage )

    >
    Is there any way to get the state apart from using
    offline storage ?As I said the caller keeps a copy in memory.
    Naturally if it is no longer in memory then that is a problem.
    >
    and also what do you mean by auditlog?
    You keep track of every change to the database by keeping the old data. There are three ways:
    1. Each table has a version number/delete flag for each record. A record is never updated nor deleted. Instead a new record is created with a new version number and with the new data.
    2. Each table has a duplicate table which has all of the same columns. When the first table is modified the old data is moved to the duplicate table.
    3. A single table is used which has columns for 'table', 'field', 'data' and 'activity' (update, delete). When a change is made in any table then this table is updated. This is generally of limited useability due to the difficulty in recovering the data.
    All of the above can have a user id, timestamp, and/or additional information which is relevant to the data being changed.
    Note that ALL of this is persisted storage.
    I am not sure what this really has to do with "offline storage" unless you are using that term to refer to backed up data which is not readily available.

  • How to test the UDA or Attribute of an ancestor member

    Hi everybody !I would like to know how to test the UDA or attribute (I can use both) of the ancestor (or the parent of the parent) of the current member please ?(the current member is on level 0 et the ancestor is on level 2).I tryed some syntax but any result :(Thanks very much for your help... JaspePS : Sorry for my "bad" english, i'm french...

    You can try using this IF conditional statement:if (@count (skipnone, (@uda (dimName, myUDA) and @ancest (@currmbr (dimName), -2))) == 1)where:dimName is the dimension of the level 0 member you are testingmyUDA is the UDA you are testingWhat this does is it counts the number of members that meet two criteria. First, it must have the UDA you specify and, second, it must be an ancestor of the current member at a specified level.If the current member has a level 2 ancestor with the UDA, it should return one member.

  • How to find the current state in web dynpro

    Hi,
       Can any one tell me how to find the current state of system (idle /not idle).
    Thanks,
    Krishna..

    Please explain further.  I don't understand how you are expecting to test for idle.  If ABAP code is being executed, then you know that the application is not idle. Only a server event could trigger code execution. Only a timedTrigger would be able to tell you that a certain amount of time has passed without activitity - although the event of the timer itself will be a server event that constitutes activity.

  • How to automate this update statement

    Hello:
    I need to convert this update statement to a pl/sql procedure so that I can update this for each mk_product_id at a time because the primary update table has 80 million lines, If I do this for one mk_product_id is very fast, I need to update closely 2 million lines for month_id =55
    update processor a set a.mkrptqty =
    (select b.mkqty*p.rpt_conv_factor
    from
    processor b,
    product p
    where a.mk_record_id = b.mk_record_id
    and a.mk_line_nbr = b.mk_line_nbr
    and b.mk_product_id = p.part_code
    and a.mk_product_id = '480'
    and b.month_id = 55)
    where
    a.month_id = 55
    and a.mk_product_id = '480'
    Thanks,
    Mohan

    PL/SQL is slower than SQL.
    Keep your update as a single large update statement, but better correlate your inner select with your outer table:
    UPDATE processor a
    SET a.mkrptqty =
      (SELECT b.mkqty*p.rpt_conv_factor
         FROM processor b,
        product p
        WHERE a.mk_record_id = b.mk_record_id
      AND a.mk_line_nbr      = b.mk_line_nbr
      AND b.mk_product_id    = p.part_code
      AND a.month_id         = b.month_id
      WHERE a.month_id  = 55
    AND a.mk_product_id = '480';As you can see in the above code I correleated processor b completely with processor a from the outer update statement. But in the process noticed that you could probably completely dispose of processor b as noted below:
    UPDATE processor a
    SET a.mkrptqty =
      (SELECT a.mkqty*p.rpt_conv_factor
         FROM product p
        WHERE a.mk_product_id    = p.part_code
      WHERE a.month_id  = 55
    AND a.mk_product_id = '480';Please note that neither of these pieces of code have been tested as I don't have relevant tables at hand to test on.
    To update many mk_product_id's at a time just use the IN operator providing it with either a select list, or list of values:
    UPDATE processor a
    SET a.mkrptqty =
      (SELECT a.mkqty*p.rpt_conv_factor
         FROM product p
        WHERE a.mk_product_id    = p.part_code
      WHERE a.month_id  = 55
    AND a.mk_product_id in ('480','481');or
      WHERE (a.month_id, a.mk_product_id)
         in ((55,'480'), (65,'481'));or
      WHERE (a.month_id, a.mk_product_id)
         in (select month_id, mk_product_id from some_table where some_conditions = 'are met');Edited by: Sentinel on Sep 17, 2008 2:25 PM

  • How to use the Include Statement in the BADI

    Dear All,
            I am trying to implement the BADI. So i need to use the Include in the BADI.
    How to use the Include statement in the BADI. I cant able to use it in the Public, Private and protected statement.
    Where should i mention that,,,,
    Thanks
    Yogesh

    Hi Sharat,
      Thanks for your reply.
    I need to use the BADI HRWPC_PCR_APPR_FORM. In which the values are available in the Container. So if i need to use the container values then i need to use that include <cntain>.
    Is there any possible ways to make it.
    Thanks
    Yogesh

  • Missing update for a game app after updating ios7 any ideas how to get the update

    Went to update a game app this morning, had already hit update when the i os7 update screen popped went through with the ios update but after ipad restarted the game update is completely missing any ideas how to get the update back no luck so far

    Hello THEVIN7
    The next step if it is not updating, would be to delete the app and then download it again. Check out the general troubleshooting for apps purchased form the App Store.
    iOS: Troubleshooting apps purchased from the App Store
    http://support.apple.com/kb/ts1702
    Regards,
    -Norm G.

Maybe you are looking for

  • TV picture very unclear when I play ipod videos

    Recently I have had a problem playing ipod videos on my tv. It used to work great, but now it only shows a picture with a bad horizontial hold. It constantly scrolls down and movies/vidoes can't be watched. Does it need to be reset?

  • Cant Call Stored Java Method Oracle 8I

    I have some java code which I have compiled under the package schedsrv which I have loaded in the server with the loadjava facility I created the procedure link using create procedure as java using schedsrv.ClassName.Procedure(java.lang.String, etc I

  • Composite Foreign Key Relationships

    I'm having problems defining relationships that are using the same set of fields in a composite primary key and a composite foreign key. Are there any examples for doing this kind of thing. I think I have the primary keys set up correctly but the for

  • Displaying image in webdynpros

    Hi Im new to webdynpros. I went through the tuorial but unfortunately I do not understand the context part of it. I created a component and all i want to do is add an image. I insert child : Image. In the Element properties of the Image, in source..h

  • Regular expressions +  JTextArea

    Hi, The aim of the code below is to match the String "one" to the text that is entered in the JTextArea (editor) using the regular expression syntax. When i add a String ("one") as an argument to p.matcher then the flow of control is passed to the Sy