Update look at table

Good Morning Everyone,
We have test1 and test2 environments.
There are 2 tables name contact and users table in both environments.
T.Contact
T.User
T1.User
The contact is reference table and have to update user table ID.
Now, we are doing following steps to update in user ID of T.Contact:
1) find last name in ID of T.User according to User IDs in T.Contact
2) find IDs in T1.User for updated ID
3) change User IDs in T.Contact
We are wondering whether better ways are exist or not.
Thanks,
S!G

Sea!Gull wrote:
Thank Mr. Justin Cave,
We still need assistance,Feel free to post in the other thread.
It makes no sense to have two threads open at the same time where slightly different sets of people ask the same questions to try to understand your requirements in order to help you. The folks that read and answer in this forum are basically the same set of folks that hang out in the PL/SQL forum. It ends up wasting a bit of your time and a lot of our time because we're just going to repeat what other folks have written.
As has been pointed out in the other thread, the example SQL statement you posted initially is syntactically incorrect on multiple levels-- we can't figure out what you originally wanted it to do. You haven't posted the table definitions as has been asked. You haven't provided sample data and you haven't explained what your query is supposed to do. So someone in that thread (one of the pains of having multiple duplicate threads is that now I don't know who made the suggestion so I can refer back to it) made an attempt to change the query to do something vaguely reasonable and syntactically correct. What you substitute depends on what you want your query to do.
Justin

Similar Messages

  • Jython error while updating a oracle table based on file count

    Hi,
    i have jython procedure for counting counting records in a flat file
    Here is the code(took from odiexperts) modified and am getting errors, somebody take a look and let me know what is the sql exception in this code
    COMMAND on target: Jython
    Command on source : Oracle --and specified the logical schema
    Without connecting to the database using the jdbc connection i can see the output successfully, but i want to update the oracle table with count. any help is greatly appreciated
    ---------------------------------Error-----------------------------
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 45, in ?
    java.sql.SQLException: ORA-00936: missing expression
    ---------------------------------------Code--------------------------------------------------
    import java.sql.Connection
    import java.sql.Statement
    import java.sql.DriverManager
    import java.sql.ResultSet
    import java.sql.ResultSetMetaData
    import os
    import string
    import java.sql as sql
    import java.lang as lang
    import re
    filesrc = open('c:\mm\xyz.csv','r')
    first=filesrc.readline()
    lines = 0
    while first:
    #get the no of lines in the file
    lines += 1
    first=filesrc.readline()
    #print lines
    ## THE ABOVE PART OF THE PROGRAM IS TO COUNT THE NUMBER OF LINES
    ## AND STORE IT INTO THE VARIABLE `LINES `
    def intWithCommas(x):
    if type(x) not in [type(0), type(0L)]:
    raise TypeError("Parameter must be an integer.")
    if x < 0:
    return '-' + intWithCommas(-x)
    result = ''
    while x >= 1000:
    x, r = divmod(x, 1000)
    result = ",%03d%s" % (r, result)
    return "%d%s" % (x, result)
    ## THE ABOVE PROGRAM IS TO DISPLAY THE NUMBERS
    sourceConnection = odiRef.getJDBCConnection("SRC")
    sqlstring = sourceConnection.createStatement()
    sqlstmt="update tab1 set tot_coll_amt = to_number( "#lines ") where load_audit_key=418507"
    sqlstring.executeQuery(sqlstmt)
    sourceConnection.close()
    s0=' \n\nThe Number of Lines in the File are ->> '
    s1=str(intWithCommas(lines))
    s2=' \n\nand the First Line of the File is ->> '
    filesrc.seek(0)
    s3=str(filesrc.readline())
    final=s0 + s1 + s2 + s3
    filesrc.close()
    raise final

    i changed as you adviced ankit
    am getting the following error now
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 37, in ?
    java.sql.SQLException: ORA-00911: invalid character
    here is the modified code
    sourceConnection = odiRef.getJDBCConnection("SRC")
    sqlstring = sourceConnection.createStatement()
    sqlstmt="update tab1 set tot_coll_amt = to_number('#lines') where load_audit_key=418507;"
    result=sqlstring.executeUpdate(sqlstmt)
    sourceConnection.close()
    Any ideas
    Edited by: Sunny on Dec 3, 2010 1:04 PM

  • Maintaining Remote key in look up tables for Production data

    Hi,
    me
    SEE in DEV and QA to maintain the Remote key for Look up tables.First i have exported those look up table values and again imported with mapping Remote keys (clone the field and map it to Remote key.). By this i have maintained the Remote keys to all look up tables. Now for Production what should i do. Is it the same process extract all records from production into our desktop and then again import it using IM, clone the field and map it to Remote key.
    1. Is this the right process?
    2. What happens if there are huge data present in production how to proceed furthr then?
    Required your suggestion please.
    Thanks,
    Pradeep

    HI Pradeep,
    I dont see any problem with this method if I am getting it right
    You are updating remote keys by reimporting lookup data, and this way you have multiple remote keys for data in lookup table,right?
    This will help you to automap entries in Import process for different Remote systems.
    I did not get your 2nd point?
    Thanks,
    Ravi

  • Sto confirmation update in ekes table me22n

    Hi,
    The confirmations tab already displays a line item details for
    confirmation category 'AB-order acknowledgement' . The thing is,
    i need to update the screen so that along with the present line
    item details, i have to display the confirmation category 'LA-
    inbound delivery'. This confirmation category actually tells the
    qty that has been shipped, which may vary from the qty on the
    std PO. The following are the fields which need to be updated in the database table ekes.
    type of conf. (EKES-EBTYP)
    delivery date (RM06E-EEIND)
    quantity (EKES-MENGE).
    i had used BAPI_PO_CHANGE , but is not updating the EKES  table which is mandatory for my requirement,
    and i also tried the bapi  ME_CONFIRMATION_UPDATE_GR , this is bapi is also not updating the table ekes,
    so shall i need to enhance the standard function module ME_CONFIRMATION_UPDATE_GR OR ANY OTHER WAY ROUND TO  MEET THE REQUIREMENT
    any guidance is much appreciated.

    I'm not sure if this will help you but I solved a similar issue once before.
    For an intercompany PO, we had different quantities on the outbound and inbound deliveries. When they tried to recieve the outbound delivery in MIGO, the inbound delivery quantity (what was ordered) would default instead of what was actually shipped.
    I implemented BADI BADI_LE_SHIPMENT so that when an outbound delivery was goods issued, the corresponding inbound delivery quantity would update if applicable. BAPI_INB_DELIVERY_CHANGE was used to modify the delivery.
    Seeing your post, I looked at EKES. The quantity was updated to the quantity of the outbound delivery. Maybe this will work for you?

  • ABAP Code Problem in Start Routine to Fill the value from Look-up Table ???

    Hi all,
         I am trying to fill the values of DOC_NUMBER & PLANT from look-up table /BIC/AZSD_O0700 (Billing Item ODS) for each BILL_NUM in Start Routine for Update Rules of Billing Header ODS and modify the data_package.
    What is wrong with the below ABAP code, PLEASE ???
    data: it_data type standard table of data_package_structure
            with header line
            with non-unique default key initial size 0.
    types: begin of billing_item_type,
                 BILL_NUM          like /BIC/AZSD_O0700-BILL_NUM,
                 DOC_NUMBER   like /BIC/AZSD_O0700-DOC_NUMBER,
                 PLANT               like /BIC/AZSD_O0700-PLANT,
             end of billing_item_type.
    refresh it_data.
    clear it_data.
    it_data[] = DATA_PACKAGE[].
    refresh DATA_PACKAGE.
    clear DATA_PACKAGE.
    loop at it_data.
        select DOC_NUMBER PLANT into (it_data-DOC_NUMBER, it_data-PLANT)
               from /BIC/AZSD_O0700
               where  BILL_NUM  = it_data-BILL_NUM
               and    FISCVARNT = it_data-fiscvarnt.
        endselect.
        if sy-subrc = 0.
           move-corresponding it_data to DATA_PACKAGE.
        endif.
      endloop.
      modify DATA_PACKAGE.
    Thanks,
    Venkat.

    Hi Venkat,
      Two things -One is the performance and the other ... there is no Append  within the loop.
      Try moving the select statement ousdie the loop to improve performance and move the modify statement into the loop ... change modify to append. Code below.
       Let me know if you need more help.
    Best regards,
    Kazmi
    data: it_data type standard table of data_package_structure
    with header line
    with non-unique default key initial size 0.
    types: begin of billing_item_type,
    BILL_NUM like /BIC/AZSD_O0700-BILL_NUM,
    DOC_NUMBER like /BIC/AZSD_O0700-DOC_NUMBER,
    PLANT like /BIC/AZSD_O0700-PLANT,
    end of billing_item_type.
    refresh it_data.
    clear it_data.
    it_data] = DATA_PACKAGE[.
    refresh DATA_PACKAGE.
    clear DATA_PACKAGE.
    loop at it_data.
    select DOC_NUMBER PLANT into (it_data-DOC_NUMBER, it_data-PLANT)
    from /BIC/AZSD_O0700
    where BILL_NUM = it_data-BILL_NUM
    and FISCVARNT = it_data-fiscvarnt.
    endselect.
    if sy-subrc = 0.
    move-corresponding it_data to DATA_PACKAGE.
    Append DATA_PACKAGE.
    endif.
    endloop.

  • New ABAP Program to check Direct UPDATE in Database Table

    Hi all,
    As per customer requirement , I have to develop ONE  Program which find out that  in which ABAP Program , Programmer has used Open Sql command like  UPDATE , DELETE , INSERT , MODIFY to direct update in Database Table.
    Have a look on all Z-ABAPs, find out if there are statements with "update", "delete", "insert" or "modify" in the coding, then find out if updates to sap-Tables are done
    How can I achived that ?
    Please , If anybody is having idea , than please let me know..
    Thanks You ,

    Hi
    Kindly refer to the below link. This has step by step how you can achieve the checks.
    [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/12659a90-0201-0010-c18b-9d014f9bed0d]
    But if you want to check if any program they have used 'UPDATE' then you can do like below.
    Go to SE38
    Utilities---> Find in Source Code-
    Find --- UPDATE
    In program - Z* or ZX* if you want to search only in Exits
    Regards,
    Vijay V .

  • How do i update a db table using one JSP page

    I created a JSP Form page and I want to update a db table when the user hit submit. Please help my job depends on it Send me small code example below is what I have (very new to JSP)
    <%@ page language="java" import="java.sql.*" import="java.io.*" %>
    <html>
    <head><title>accessing database</title></head>
    <body bgcolor="white">
    <%     Connection con =null;
         try {
    // Load Driver Class File
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    //Make a connection to Data table
    con = DriverManager.getConnection("jdbc:odbc:SportsbookTables", "developer", "developer");
    Statement statement =con.createStatement();
    String SQL = new String("INSERT INTO tblLines (gameID,leagueType) VALUES (5,'gam')");
    statement.executeUpdate(SQL);
    statement.executeUpdate("INSERT INTO tblLines (gameID,leagueType) VALUES (6,'lea')");
    %>
    <table border=1 cellspacing=1 cellpadding=1>
    <form method="POST">
    <p><font color="#800000" size="5">Enter your name:</font><input name="leagueType" size="4"></p>
    <p><input type="submit" value="Submit"></p>
    </form>
    <%
    catch (IOException ioe)
    out.println("IO Exception:");
    out.println(ioe.getMessage());
    catch (SQLException sqle)
    out.println("SQL Exception:");
    out.println(sqle.getMessage());
    catch (ClassNotFoundException cnfe)
    out.println("Class Not Found Exception:");
    out.println(cnfe.getMessage());
    catch (Exception e)
    out.println("General Exception:");
    out.println(e.getMessage());
    finally {
    try
    if (con!=null) {
    con.close();
    catch(SQLException sqle)
    out.println(sqle.getMessage());
    %>
    </table>
    </Body>
    </HTML>

    First I would remove all the JDBC code you have in the JSP and place it in a servlet (or other Java) class, and have your form action call the servlet on submission. Then use the servlet API to extract the form data from the request and pass it to the JDBC in the servlet to update the DB. Once complete have it branch to another JSP/HTML to let the user know if they were successful or not.
    Take a look at some of the online tutorials as they will be helpful with regards to code examples.
    Depending on the size of your project, and deadlines naturally, you may also want to have a look at an MVC architecture and custom tags like Struts from Apache. These can make your job a lot eaiser.

  • In OWB I need to update the target table with same field for match/update

    In OWb I am trying to update the target table with the match and the update on the same field can this be done. I am getting a error match merge error saying you cannot update and match on the same field. But in SQl my select is
    Update table
    set irf = 0
    where irf = 1
    and process_id = 'TEST'
    Hwo do i do this in OWB.

    table name is temp
    fields in the table
    field1 number
    field2 varchar2(10)
    field3 date
    values in the table are example
    0,'TEST',05/29/2009
    9,'TEST',05/29/2009
    0,'TEST1',03/01/2009
    1,'TEST1',03/01/2009
    In the above example I need to update the first row field1 to 1.
    Update temp
    set field1 = 1
    where field1 = 0
    and field2 = 'TEST'
    when I run this I just need one row to be updated and it should look like this below
    1,'TEST',05/29/2009
    9,'TEST',05/29/2009
    0,'TEST1',03/01/2009
    1,'TEST1',03/01/2009
    But when I run my mapping I am getting the rows like below the second row with 9 also is getting updated to 1.
    1,'TEST',05/29/2009
    1,'TEST',05/29/2009
    0,'TEST1',03/01/2009
    1,'TEST1',03/01/2009

  • Update openquery remote table with join

    Hi All,
    I have a problem with OPENQUERY update on remote table. I've googled for days, and can't solve the problem.
    Here is the problem:
    Local server MS SQL 2005.
    Remote server: MySQL.
    The linked server is communicating through MySQL ODBC 5.1
    I created the following code for update (tried many other version too, this is the last one):
    update openquery(Remoteserver,'select products_id, products_price, products_last_modified, products_stock from products1')
    set
    products_price=A.products_price,
    products_stock=A.products_stock,
    products_last_modified=getdate()
    FROM
    (select * from vi_products_update) AS A INNER JOIN
    openquery(octopus, 'select products_id from products1')AS B
    ON A.products_id=B.products_id
    When I run the query the columns are updated with the same value, for each record. It looks the value is the first which match the criteria. Each (remote and local) table has as primary key products_id. In this example I used as result set for local a view, but I have the same result if I use a table.
    the products_last_modified column is updated in order, and if I update for e.g. the products_price with a constant that is ok too. The problem should be somewhere with join, but I can' get it where.
    THX for any help
    ab

    Hi
    Did you ever solve this problem
    I have the same issue trying to update many rown in a MySQL table from SQL2005 using the syntax below,
    UPDATE
    openquery(DEV,'select id, `desc` from todLocationGroups')
    SET [desc] = V.Destination_Group FROM
    (select * from VTM_TOD_Rate) as V inner join
    openquery(DEV,'select id, `desc` from todLocationGroups') as K
    ON K.id = V.TOD_LG_ID
    but i get this error
    OLE DB provider "MSDASQL" for linked server "KAYOTE_DEV" returned message "Row cannot be located for updating. Some values may have been changed since it was last read.".
    Msg 7343, Level 16, State 4, Line 1
    The OLE DB provider "MSDASQL" for linked server "KAYOTE_DEV" could not UPDATE table "[MSDASQL]". The rowset was using optimistic concurrency and the value of a column has been changed after the containing row was last fetched or resynchronized.

  • Update columns in Table A based on columns in Table B for more than 500K rows

    Guys,
    I need to update 9 columns in table A based on value from table B for for more than 500K rows.
    So what is best way to achieve this. I am thinking of writing a Procedure with cursor to update the rows of table A.
    When i googled about it, they say cursor will decrease the performance. So i have no clue how to go for this.
    Rough code which i though
    1) Procedure  with no parameter
    2) Will declare 9 variable to store value from cursor
    3) cursor will fetch row by row based on join condition between table a and table b
    4) i will pass column values from table B to variables
    5) will make an update statement for table A
    Please let me know if above method is correct or is there any other way to do this without using cursor.

    Guys,
    Below is the rough code i wrote as per my requirement. Does it look correct? As of now i dont have any platform to test it so any help with the below code is highly appreciated.  As i said i need to update more than 500K rows by matching Table
    A and Table B.  One more thing which i would like to add in below code, is to get log of all the rows that are in table B but not exist in table A.  Table A already has more than million data in it.
    Also not sure how the loop in below code willl run when @rowcount is become to zero?
    Please let me know if i need to consider performance related impact while running the script.
    GO
    SET SERVEROUTPUT ON
    CREATE PROCEDURE ONETIMEUPDATE
     DECLARE @cnt INT;
     SET @cnt = 1;
     DECLARE @MSG varchar(255);
     DECLARE @COUNT_VAR INT;
     SET @COUNT_VAR=0;
     WHILE @cnt > 0
        BEGIN
      Update TOP (50000) A
      Set A.Col1=B.Col1,
          A.COL2=B.COL2,
          A.COL3=B.COL3,
          A.COL4=B.COL4,
          A.COL5=B.COL5,
          A.COL6=B.COL6,
          A.COL7=B.COL7
      From TableA A
             Inner Join TableB B
             on A.ID = B.ID--ID
             WHERE A.Col1 <> B.Col1
                    OR A.Col2 <> B.Col2;
              SET @cnt = @@ROWCOUNT;
             IF @@ROWCOUNT=25000
               @COUNT_VAR=@COUNT_VAR + @@ROWCOUNT
               SELECT @MSG = CONVERT(varchar, @COUNT_VAR) + "Rows Updated" -- I WANT TO DISPLAY UPDATE after EVERY 25000 ROWS
              PRINT @MSG
      IF @@ROWCOUNT=0
         BEGIN    
               COMMIT
                       END
                    WAITFOR DELAY '00:00:01'  --wait for a second before the next update
                END;
     END;

  • Why updates on some tables with always on synchronize mode take * 100 than when asynchronize mode

    I have Always-On synchronization on some databases, We want to change from asynchronize mode to synchronize mode, I tested to see what the  change in performance between the two, and found that in general the select statements keep the same
    duration with and without synchronize mode, most of the update\insert usually take around * 4 times from the asynchronize mode, BUT some updates take much longer. I would like to understand why things take MUCH longer (I understand that working with synchronize
    mode is a 2 phase commit and should take * 4 times, but I can't understand why some of them take 50 - 100 times more).
    1. One query is an update made on a table with few records (up to 40 records), this update run 250K times a day, and a very simple update on this table takes * 98 than without synchronize mode
    1. An update on a big table with 2 million records, using a query that specify the unique column in the primary cluster key, takes 50 times more.
    What are  the factors that have dramatic influence on performance when 2 phase commit (asynchronize mode) is used?

    I've never even looked at the details for SQL Server, but on any kind of a system doing synchronous updates, you have to figure there is a fixed cost, a variable cost, and a queuing cost.  The fixed cost always hits whether its a big transaction or
    a small transaction, let's guess it's about 0.1 seconds for a round trip.  Variable cost depends on how much is updated, let's say it's linear, and is maybe 0.05 seconds for a couple of small rows.  The queuing cost varies from 0 to huge.
    So if you have a small transaction on a local system that takes 0.05 seconds (50 milliseconds), then just one will incur the local 0.05, plus 0.10, plus 0.05, and zero queuing cost, so 0.05 -> 0.20, about 4x.
    But if you have something that runs 250k times a day I hope it's faster, maybe it's only 0.01 seconds locally, and that turns to 0.01 + 0.10 + 0.01 + q, so 0.01 -> 0.12+q, so it's at *least* 12x slower, and maybe if you get 100 of them
    in the same second you start incurring queuing delays also, in fact you may have similar queuing delays on the local system and remote system besides any communications queuing, but if just the synchronization system has some queuing limits and it even gets
    to 0.30 seconds then 0.01 -> 0.42, or 42x, and you start seeing what can happen.  If your local transaction is only 0.001 seconds when not synchronized, then you'd have 100x slowdown just on the fixed overhead!
    IOW, synchronized systems and tons of small, fast transactions just don't fit together very well.
    HTH,
    Josh

  • Updating A child Table As Administrator

    Hello Eevryone, I read a post here http://forums.adobe.com/thread/463635. And i first off want to commend you guys on your awesome contribution to novices like me. I understand the technique presented here but I have a different problem though. I have two tables, which are related by one to many. Personals Table and Courses Table. One person can have many courses. Only the Admin can update and add new courses. The Courses Table has a Foreign key: personal_Id. The admin has a view page and can update personals table easily. How can I add and update courses for a selected Person. I mean how to build the recordset in Dreamweaver CS5 so that I cant pick just that persons ID and add all course just for his account. In the technical sense how do I parse the FK_personal_Id so that the add course form or update course form only stores the course for that personal_ID on Personal Table. Please I hope you understand how I have explained it but I would love to know this procedure. Thank you very much.

    You don't really want to create a recordset to update the tables. You don't mention what scripting language you are using. In ASP, you CAN  create updateable recordsets, but it's really not necessary in this circumstance. You simply need to create an update statement to update the parent table, and an insert statement to insert the record into the related table when the form is posted. You can use DW's server behaviors to accomplish one or the other if you want - but not both. If I am performing a CUD on multiple tables, I would think about writing a stored procedure. Again, it depends on your DBMS. I'd suggest looking into DW Insert record and update record server behaviors to start with.

  • Updating a Partitioned Table

    Hi
    I have a partitioned table with 1000 million records with avg 20 million records in each partition
    and I want to update the entire table.
    The way I am updating the table is for e.g.
    UPDATE /*+ PARALLEL(A,8) BKG_FAC A
    SET
    A.BKG_FLAG = DECODE(A.BKG_FLAG, NULL, 'N','Y'),
    A.BKG_ITEM = DECODE('ABC','123','DEF','456','999')
    WHERE PART_KEY BETWEEN 1 AND 5     -- stPart and endPart
    AND SUBSTR(ebt.ROWID, 15, 1) BETWEEN STARTCHAR AND ENDCHAR;     
    Passing STARTCHAR AND ENDCHAR so that it splits the rows into 8 parts based on distinct rowid's.
    It works fine with the non partitioned tables.
    Looks like it is issuing lock on the entire table and only one partition is being executed at a time so it is taking long time to come out.
    Could some one shed some light on this and suggest best/fast way to do it.
    Thanks,
    Chandu.

    Yes I do with the following command in my procedure.
    EXECUTE IMMEDIATE 'ALTER SESSION ENABLE PARALLEL DML';

  • Updating CPS script tables

    Hi all,
    Beginner question.
    What is the syntax/appropriate method to update an entry in a self-defined CPS table? I am able to insert values, but the method/syntax for updating specific columns is not clear.
    Thanks to some helpful posts I have the following already that simply checks my test table ( a table defined under the scripting section as a table with a single string column called "Description") for the existence of a value that matches the key. If this is found, an update should be triggered (this fails), if not found, then an insert is done (this works).
       Table table = jcsSession.getTableByName("TEST_TABLE");
       String searchKey = "1000";
       String key = "1000";
       boolean boolFound = false;
       if (table != null) {
         for (Iterator it = table.getTableRowByKey(searchKey); it.hasNext();) {
           TableValue tv = (TableValue)it.next();
           bFound = true;     
       if (boolFound) {
           // Updating value
           jcsOut.println("Found an entry, updating");
           TableValue tv = table.createTableValue();
           tv.setSearchKey(key);
           tv.setColumnName("DESCRIPTION");
           tv.setColumnValue("Updated description");
           jcsSession.persist();
       else {
         // Insert value
         jcsOut.println("Inserting new entry");
         TableValue tv = table.createTableValue();
         tv.setColumnName("DESCRIPTION");
         tv.setKey(key);
         tv.setColumnValue("New description");
         tv.setSearchKey(key);
         jcsSession.persist();
    Error is then:
    Caused by: JCS-102313: SearchKey: 1000 can not be different than: null
    If using the setKey method, the failure raised relates to a duplicate key field, asn the createTableValue() seems to be intended only to insert new values into tables.
    Thanks in advance.
    Edited by: JoStew on Nov 28, 2011 1:45 PM

    It`s me again. I read you coding again and I'am sure I found your problem.
    You have a TableValue with key 1000
    String searchKey = "1000";
    String key = "1000";
       Table table = jcsSession.getTableByName("TEST_TABLE");
       String searchKey = "1000";
       String key = "1000";
       boolean boolFound = false;
       if (table != null) {
         for (Iterator it = table.getTableRowByKey(searchKey); it.hasNext();) {
           TableValue tv = (TableValue)it.next();
           bFound = true;     
    And now you will create another Dataset with Key 1000
    if (boolFound) {
           // Updating value
           jcsOut.println("Found an entry, updating");
           TableValue tv = table.createTableValue();
           tv.setSearchKey(key);
           tv.setColumnName("DESCRIPTION");
           tv.setColumnValue("Updated description");
           jcsSession.persist();
    Try something like this:
    if (table != null) {
         for (Iterator it = table.getTableRowByKey(searchKey); it.hasNext();) {
           TableValue tv = (TableValue)it.next();
           // You have found the Dataset by SearchKey and Searchkey == DatasetKey, so only one dataset will be found.
          // now    
           tv.setColumnName("DESCRIPTION");
           tv.setColumnValue("Updated description");
          boolFound = true;
          jcsSession.persist();
        if(!boolFound)
         // It`s a new Dataset
         jcsOut.println("Inserting new entry");
         TableValue tv = table.createTableValue();
         tv.setColumnName("DESCRIPTION");
         tv.setKey(key);
         tv.setColumnValue("New description");
         tv.setSearchKey(key);
         jcsSession.persist();
    }else ....
    I hope this will help. I will check my coding tomorrow, but it looks ok. At the moment I haven't a SAPCPS to check it out.
    Kind Regards
    Marc

  • After Update on htmldb table, my allplication isnt working anymore

    Hi !
    I made an update on an flows-table. It was flows_page_plugs.
    I updated plug source for a region.
    After that, the whole application wasnt working anymore and i got the error
    workpace 0 has no privileges to parse schema ...
    Why do i get this error ? What did i damage ?
    Is it GENERALLY forbidden to make updates on the table of the flows user ?
    By the way, how can i get the thing up an working again ?
    Thanks
    Bernd

    Hi !
    It is not a critical thing. I got the application working by flashback my DB to a point in time prior to my update.
    But I did not find any hint to fix this problem within Apex. Thats the reason for the question.
    I made the following update :
    update flow_page_plugs set plug_source = 'SOME HTML TEXT' where flow_id = 105 and page_id=4 and plug_name = 'TESTREGION';
    What did i want to achieve by this ?
    I was looking for a possibility to create something like "dynamic" html-regions.
    This region "testregion" is a html-region. I have a procedure that creates some html-text and i want to display this text within a region html-formatted. So i thought to update the region with this new text would be a good idea.
    Greetings
    Bernd

Maybe you are looking for

  • Software Update not working

    On my Mac Mini Software Update is not working as expected. I have this machine setup with multiple accounts and my kids accounts are very limited so they can use the computer safly while I am not home. My account has admin permissions. When I log int

  • Trouble in Starting Tomcat server

    Hi, I installed Eclipse & Tomcat. I started Tomcat using Eclipse. In console it showed as Jun 24, 2006 4:55:09 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Starting service Tomcat-Standalone Apache T

  • Mac mini mid-2010 won't shut down

    I have the server version of the Mac Mini mid-2010. It is running Mountain Lion (not server).  When told to shut down from the Apple icon menu, it won't. The "round thing icon" just spins indefinitely.  Can't do an EFI update, of course, because the

  • Deploy SQL Management Studio 2012 through SCCM

    Hello, Has anyone successfully deployed SQL Management Studio 2012 with SCCM? A couple of specific questions: - Which folder from the SQL Media is required to ensure that only Management Studio deploys (we would like to limit the size of the deployme

  • Is there a case with keyboard in Spanish?,

    Is there a case with keyboard in Spanish?, for mini iPad