Deadlock when updating different rows on a single table with one clustered index

Deadlock when updating different rows on a single table with one clustered index. Can anyone explain why?
<event name="xml_deadlock_report" package="sqlserver" timestamp="2014-07-30T06:12:17.839Z">
  <data name="xml_report">
    <value>
      <deadlock>
        <victim-list>
          <victimProcess id="process1209f498" />
        </victim-list>
        <process-list>
          <process id="process1209f498" taskpriority="0" logused="1260" waitresource="KEY: 8:72057654588604416 (8ceb12026762)" waittime="1396" ownerId="1145783115" transactionname="implicit_transaction"
lasttranstarted="2014-07-30T02:12:16.430" XDES="0x3a2daa538" lockMode="X" schedulerid="46" kpid="7868" status="suspended" spid="262" sbid="0" ecid="0" priority="0"
trancount="2" lastbatchstarted="2014-07-30T02:12:16.440" lastbatchcompleted="2014-07-30T02:12:16.437" lastattention="1900-01-01T00:00:00.437" clientapp="Internet Information Services" hostname="CHTWEB-CH2-11P"
hostpid="12776" loginname="chatuser" isolationlevel="read uncommitted (1)" xactid="1145783115" currentdb="8" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058">
           <inputbuf>
UPDATE analyst_monitor SET cam_status = N'4', cam_event_data = N'sales1', cam_event_time = current_timestamp , cam_modified_time = current_timestamp , cam_room = '' WHERE cam_analyst_name=N'ABCD' AND cam_window= 2   </inputbuf>
          </process>
          <process id="process9cba188" taskpriority="0" logused="2084" waitresource="KEY: 8:72057654588604416 (2280b457674a)" waittime="1397" ownerId="1145783104" transactionname="implicit_transaction"
lasttranstarted="2014-07-30T02:12:16.427" XDES="0x909616d28" lockMode="X" schedulerid="23" kpid="8704" status="suspended" spid="155" sbid="0" ecid="0" priority="0"
trancount="2" lastbatchstarted="2014-07-30T02:12:16.440" lastbatchcompleted="2014-07-30T02:12:16.437" lastattention="1900-01-01T00:00:00.437" clientapp="Internet Information Services" hostname="CHTWEB-CH2-11P"
hostpid="12776" loginname="chatuser" isolationlevel="read uncommitted (1)" xactid="1145783104" currentdb="8" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058">
            <inputbuf>
UPDATE analyst_monitor SET cam_status = N'4', cam_event_data = N'sales2', cam_event_time = current_timestamp , cam_modified_time = current_timestamp , cam_room = '' WHERE cam_analyst_name=N'12345' AND cam_window= 1   </inputbuf>
          </process>
        </process-list>
        <resource-list>
          <keylock hobtid="72057654588604416" dbid="8" objectname="CHAT.dbo.analyst_monitor" indexname="IX_Clust_scam_an_name_window" id="lock4befe1100" mode="X" associatedObjectId="72057654588604416">
            <owner-list>
              <owner id="process9cba188" mode="X" />
            </owner-list>
            <waiter-list>
              <waiter id="process1209f498" mode="X" requestType="wait" />
            </waiter-list>
          </keylock>
          <keylock hobtid="72057654588604416" dbid="8" objectname="CHAT.dbo.analyst_monitor" indexname="IX_Clust_scam_an_name_window" id="lock18ee1ab00" mode="X" associatedObjectId="72057654588604416">
            <owner-list>
              <owner id="process1209f498" mode="X" />
            </owner-list>
            <waiter-list>
              <waiter id="process9cba188" mode="X" requestType="wait" />
            </waiter-list>
          </keylock>
        </resource-list>
      </deadlock>
    </value>
  </data>
</event>

To be honest, I don't think the transaction is necessary, but the developers put it there anyway. The select statement will put the result cam_status
into a variable, and then depends on its value, it will decide whether to execute the second update statement or not. I still can't upload the screen-shot, because it says it needs to verify my account at first. No clue at all. But it is very simple, just
like:
Clustered Index Update
[analyst_monitor].[IX_Clust_scam_an_name_window]
cost: 100%
By the way, for some reason, I can't find the object based on the associatedObjectId listed in the XML
<keylock hobtid="72057654588604416" dbid="8" objectname="CHAT.dbo.analyst_monitor"
indexname="IX_Clust_scam_an_name_window" id="lock4befe1100" mode="X" associatedObjectId="72057654588604416">
For example: 
SELECT * FROM sys.partition WHERE hobt_id = 72057654588604416
This return nothing. Not sure why.

Similar Messages

  • Trigger in mutation - Update another rows in the same table with a trigger

    Hi ,
    I try to do a before update trigger on a table , but the trigger is in mutation. I understand why it do that but my question is :
    How can I update other rows in the same table when a UPDATE is made on my table??????
    Here is my trigger :
    CREATE OR REPLACE TRIGGER GDE_COMPS_BRU_5 BEFORE
    UPDATE OF DEPARTEMENT--, DISCIPLINE, DEG_DEMANDE, CE_ETAB
    ON GDEM.COMPOSITION_SUBV
    FOR EACH ROW
    Organisme : FQRNT-FQRSC
    Date de création : 14-07-2011
    Date de modification :
    Modifié par :
    Auteur : Johanne Plamondon
    Description : Ce déclencheur s'executera lors de la modification
    du responsable dans la table COMPOSITION_SUBV
    DECLARE
    V_OSUSER V$SESSION.OSUSER%TYPE;
    V_PROGRAM V$SESSION.PROGRAM%TYPE;
    V_TERMINAL V$SESSION.TERMINAL%TYPE;
    V_MACHINE V$SESSION.MACHINE%TYPE;
    V_MODULE V$SESSION.MODULE%TYPE;
    V_LOGON_TIME V$SESSION.LOGON_TIME%TYPE;
    V_AUDIT_ID NUMBER;
    vSEQ NUMBER;
    i NUMBER;
    vID DEMANDE.ID%TYPE;
    BEGIN
    begin
    SELECT OSUSER, PROGRAM, TERMINAL,MACHINE,MODULE, LOGON_TIME
    INTO V_OSUSER,V_PROGRAM,V_TERMINAL,V_MACHINE,
    V_MODULE,V_LOGON_TIME
    FROM V$SESSION
    WHERE TYPE = 'USER'
    AND USERNAME = USER
    AND LAST_CALL_ET IN (0,1)
    AND ROWNUM < 2;
    exception when others then null; end;
    IF NVL(:NEW.SC_PART,' ') = 'CHC' THEN
    SELECT COUNT(*)
    INTO i
    FROM DEMANDE
    WHERE DEM_REF = :NEW.DEM_ID
    AND PER_NIP = :NEW.PER_NIP;
    IF i = 1 THEN
    SELECT ID
    INTO vID
    FROM DEMANDE
    WHERE DEM_REF = :NEW.DEM_ID
    AND PER_NIP = :NEW.PER_NIP;
    UPDATE COMPOSITION_SUBV
    SET --CE_ETAB     = :NEW.CE_ETAB,
    --DISCIPLINE  = :NEW.DISCIPLINE,
    DEPARTEMENT = :NEW.DEPARTEMENT,
    --DEG_DEMANDE = :NEW.DEG_DEMANDE,
    DATE_MODIF = SYSDATE,
    USER_MODIF = V_OSUSER
    WHERE DEM_ID = vID
    AND PER_NIP = :NEW.PER_NIP
    AND ANNEE = :NEW.ANNEE;
    END IF;
    END IF;
    /*EXCEPTION
    WHEN OTHERS THEN
    NULL;*/
    END;

    A standard disclaimer, the mutating trigger error is telling you that you really, really, really don't want to be doing this. It generally indicates a major data model problem when you find yourself in a situation where the data in one row of a table depends on the data in another row of that same table. In the vast majority of cases, you're far better off fixing the data model than in working around the problem.
    If you are absolutely sure that you cannot fix the data model and must work around the problem, you'll need
    - A package with a collection (or global temporary table) to store the keys that are modified
    - A before statement trigger that initializes the collection
    - A row-level trigger that adds the keys that were updated to the collection
    - An after statement trigger that iterates over the data in the collection and updates whatever rows need to be updated.
    If you're on 11g, this can be simplified somewhat by using a compound trigger with separate before statement, row-level, and after statement sections.
    Obviously, though, this is a substantial increase in complexity over the single trigger you have here. That's one of the reasons that it's generally a bad idea to work around mutating table exceptions.
    Justin

  • Error in replicat when updating a row

    Oracle 11gR2
    OGG 11.1.1.1.5
    I am getting the following error when updating a row that exists in both the target and source db:
    OCI Error ORA-01403: no data found, SQL <UPDATE....The following is in the discard file:
    Record not found
    Mapping problem with compressed key update record (target format)...
    ...The row DOES exist in the target db for sure. But for some reason it thinks that it is not there...why?
    Here are the exact steps I did:
    1. Created a table in source
    2. Create the same table in target (explicitly not through replication as we have an exclude filter on 'CREATE')
    3. Inserted rows into source table (which were replicated to target table).
    4. Delete a row in the source table (which were not applied to target as I am using the IGNOREDELETE parameter)
    5. Update a row in the source table (this is where I got the above mentioned error 'ORA-1403' even though the row does exist.)

    mb_ogg is very likely right - you forgot to "add trandata" as that's the number one most common reason for an ORA-1403 (ANSI 100) no data found error.
    The problem is that Oracle does not automatically log the PK, it only logs that which changed. Down at the replicat on the target it tries to update but the WHERE clause has PK = NULL because it was not logged in the redo. To have it logged in the redo so that the target UPDATE statement has a correct value for PK, you need to use GGSCI to issue "add trandata," which performs an "ALTER TABLE ADD SUPPLEMENTAL LOG GROUP ... ALWAYS".
    "INFO TRANDATA", if using OGG version 11.2+ on Oracle it will tell you if logging is enabled on a table and for which columns.
    Good luck,
    -joe

  • Validation problem when update a row in OAF

    created a application using OAF. No problem to create a row, when tried to update the row, received the following error message:
    oracle.jbo.RowValException: JBO-27012: Row validation method validation() failed for row with key oracle.jbo.Key
    2) Steps to Reproduce
    select a row from search result page for update, after change the value and apply it, received the following error message:
    oracle.jbo.RowValException: JBO-27012: Row validation method validation() failed for row with key oracle.jbo.Key

    yes. it is the EO based VO page. Create and Update used same VO and no problem to create the row, had problem when update the row.

  • How to display data from 2 different groups in a single table

    Hi,
    Following is the requirement:
    The XML Content is below
    ListOf_ssAssetMgmtAsset>
    -<ssAssetMgmtAsset>
    <ssAccountName>1-1D09-83031</ssAccountName>
    <ssAccountPrimaryCountry>USA</ssAccountPrimaryCountry>
    <ssAssetNumber>13111027</ssAssetNumber>
    <ssNaiAssetNumber>123</ssNaiAssetNumber>
    <ssNaiGrantNumber>ABC</ssNaiGrantNumber>
    <ssNaiProductType>System Security Software</ssNaiProductType>
    <ssNaiSuperceded>123</ssNaiSuperceded>
    <ssProductDescription>Upgrade extract local DB</ssProductDescription>
    <ssProductName>1-1M5H-296</ssProductName>
    <ssStatus>ABC</ssStatus>
    <ssId>1X-ZY</ssId>
    <ssCreated>01/01/1980</ssCreated>
    <ssUpdated>01/01/1980</ssUpdated>
    <ssCreatedBy>1X-ZY</ssCreatedBy>
    <ssUpdatedBy>1X-ZY</ssUpdatedBy>
    -<ListOf_ssAgreementEntitlement>
    -<ssAgreementEntitlement>
    <ssEntitlementEndDate>16/12/2009</ssEntitlementEndDate>
    <ssEntitlementStartDate>16/11/2009</ssEntitlementStartDate>
    <ssEntitlementType>Services</ssEntitlementType>
    <ssNaiQuantity>2</ssNaiQuantity>
    </ssAgreementEntitlement>
    </ListOf_ssAgreementEntitlement>
    -<ListOf_ssAgreementEntitlement>
    -<ssAgreementEntitlement>
    <ssEntitlementEndDate>10/12/2009</ssEntitlementEndDate>
    <ssEntitlementStartDate>10/11/2009</ssEntitlementStartDate>
    <ssEntitlementType>ServicePortal</ssEntitlementType>
    <ssNaiQuantity>1</ssNaiQuantity>
    </ssAgreementEntitlement>
    </ListOf_ssAgreementEntitlement>
    </ssAssetMgmtAsset>
    </ListOf_ssAssetMgmtAsset>
    The data needs to be displayed in the below manner where first grouping is by Account Country, then by Account Name. Then the table with 9 columns where in the first 5 columns are from first group and the next 4 are from second group.
    Account Country
    Account Name
         ProductType     Grant #     Asset #     Product SKU Product Name Entitlement Type Quantity /Nodes     EntitlementStart Date     Entitlement EndDate
    I have the coding as
    first for loop: <?for-each-group:ssAssetMgmtAsset;./ssAccountPrimaryCountry?>
    second for loop: <?for-each-group:current-group();./ssAccountName?>
    third which is for the table : <?for-each:current-group()?>
    I close the above grp after product description.
    One table with the first 5 columns and below second table is placed adjacent to the first to display the 4 columns with the grp <?for-each:ssAgreementEntitlement?>
    how do I get all the 9 columns in a single row in a single table.
    Any help is appreciated.
    thanks

    What is the lnk between the two
    ssAssetMgmtAsset and ssAgreementEntitlement ?
    you want to display all the ssAgreementEntitlement for every ssAssetMgmtAsset group ?
    there shud be a link between them, you have link them and display.

  • SUM two fileds from different rows from the same table

    I would like to SUM two fileds from different rows from the same table but I don't know how to do that.
    E.g.
    BillingTransactionsIndex      CreateDate      UserType      UserIndex      TransType      Reference      Total      Balance
    2      6/5/2008 15:02      1      51      1      150      -288.2      -288.2
    5      6/8/2008 11:55      1      51      1      157      -1.58674      -289.787
    In the table above I want SUM fields Total and Balance for the first row and the the next row SUM 2nd row Total with 1st row Balance
    Please help
    Thanks

    SQL> with tbl as
      2  (select 1 as ID,  90 as total from dual
      3          union all
      4  select 2 as ID,  23 as total  from dual
      5          union all
      6  select 3 as ID,  15 as total  from dual
      7          union all
      8  select 4 as ID,  20 as total  from dual)
      9  select id , total, sum(total) over (order by ID) as balance from tbl
    10  /
            ID      TOTAL    BALANCE
             1         90         90
             2         23        113
             3         15        128
             4         20        148
    SQL>

  • Taking data from two different server in a single table

    Hi All,
    can u plz tell me i want take a data from a two different server in a single table
    Thanks,
    Bell.

    Again, you have written the same sentence. I have 2 servers Server1 and Server2 and one table called my_table (You or God knows where this table is).
    Now tell us what you want to do ?
    Sidhu
    http://amardeepsidhu.blogspot.com

  • Will there performance improvement over separate tables vs single table with multiple partitions?

    Will there performance improvement over separate tables vs single table with multiple partitions? Is advisable to have separate tables than having a single big table with partitions? Can we expect same performance having single big table with partitions? What is the recommendation approach in HANA?

    Suren,
    first off a friendly reminder: SCN is a public forum and for you as an SAP employee there are multiple internal forums/communities/JAM groups available. You may want to consider this.
    Concerning your question:
    You didn't tell us what you want to do with your table or your set of tables.
    As tables are not only storage units but usually bear semantics - read: if data is stored in one table it means something else than the same data in a different table - partitioned tables cannot simply be substituted by multiple tables.
    Looked at it on a storage technology level, table partitions are practically the same as tables. Each partition has got its own delta store & can be loaded and displaced to/from memory independent from the others.
    Generally speaking there shouldn't be too many performance differences between a partitioned table and multiple tables.
    However, when dealing with partitioned tables, the additional step of determining the partition to work on is always required. If computing the result of the partitioning function takes a major share in your total runtime (which is unlikely) then partitioned tables could have a negative performance impact.
    Having said this: as with all performance related questions, to get a conclusive answer you need to measure the times required for both alternatives.
    - Lars

  • Does USD NACHA CCD Plus Format support one single payment with one vendor?

    Hi,
    We are implementing USD NACHA CCD Plus Format file for my customer.
    Have the following query:
    Does USD NACHA CCD Plus Format support one single payment with one vendor and another single payment with
    different vendor in single file or will it generate two files for two payments or will it support single payment only.
    Can anyone help us in this regard.
    Thanks,Venkat.

    I have created one invoice1 with one vendor and another invoice 2 with
    different vendor processed the PPR using USD NACHA CCD Plus Format .
    Both two payments came single file.
    But we know that USD NACHA CCD Plus Format support Single Payment only.
    Can anyone help us in this regard.
    Thanks,Venkat

  • When I install firefox/addon/hide-tab-bar-with-one-tab, I loose the close "x" on all my tabs

    when I install firefox/addon/hide-tab-bar-with-one-tab, I loose the close "x" on all my tabs!
    PLAIN AND SIMPLE!!!!! I am starting to hate Firefox.
    firefox 25

    I'm sure the author will issue the final release at some point. It's their add-on and their call on the timing.

  • How to create editable table with one empty row ?

    I'm looking for solution how to create editable table with one empty row using ADF BC. I have seen this solution in application that was created in JHeadstart and it's very well idea to use it insead of creation form.

    hammm, i do it this:
    drop the VO on the page, select Table->ADF Table....
    so, drop the botton create, from de VO->operations->create (the firts), and right botton (mouse) Edit binding....
    in Data collection select the VO, in Select an action select CreateInsert
    luck

  • Updating table with Modified date/time when updating any row

    Hi guys,
    What I am trying to do is this. I have a several rows in my table, alongwith the field 'Modified_date'. I want to insert a modified_date if and when I update the row in the table. Here's my code, but it's not working:
    PROCEDURE ip_maint_save (p_submit IN VARCHAR2 DEFAULT NULL ,
    p_user_no IN varchar_array_type,
    p_user_id IN varchar_array_type,
    p_ip_first IN varchar_array_type,
    p_ip_last IN varchar_array_type,
    p_user_type IN varchar_array_type,
    p_user_language IN varchar_array_type,
    p_blue_jays IN varchar_array_type,
    p_created_by IN varchar_array_type,
    p_modified_by IN varchar_array_type,
    p_modified_date IN DATE := SYSDATE
    IS
    v_count_rec PLS_INTEGER := 0;
    BEGIN
    FOR i IN NVL (p_user_no.FIRST, 1) .. NVL (p_user_no.LAST, 0) LOOP
    IF p_user_id (i) IS NOT NULL THEN
    BEGIN
    UPDATE IP_MAP
    SET IP_FIRST = p_ip_first (i),
    IP_LAST = p_ip_last (i),
    USER_ID = p_user_id (i),
    USER_TYPE = p_user_type (i),
    USER_language = p_user_language (i),
    IP_FIRST_number = Mr_Ip_Maint.ip_to_number (p_ip_first (i)),
    IP_LAST_number = Mr_Ip_Maint.ip_to_number (p_ip_last (i)),
    MODIFIED_DATE = p_modified_date (i)
    WHERE USER_NO = p_user_no (i);
    .....rest of the code/exceptions follow....
    It's not working. Although, I am able to update a row, but it's not inserting/updating the modified_date field in the table for which the row is updated.
    Thanks in advance.

    Hi,
    As per my understanding, you are passing many values at a time to be updated using varchar_array_type type. In such scenario if your User_no is 100,101,102 all are being looped and the table is updated. But where are you checking the updated field or on what bases you will come to know that this particular field is updated.
    I will suggest you to use before update triggers. As in triggers you can check the rows old and new value and then set sysdate for modified_date column.
    Something like this,
    create or replace trigger trg_IP_MAP on IP_MAP
    before update
    For Each Row
    Begin
         If (:OLD.IP_FIRST != :NEW.IP_FIRST  OR
              :OLD.IP_LAST != :NEW.USER_ID OR
              :OLD.USER_TYPE != :NEW.USER_TYPE OR
              :OLD.USER_language != :NEW.USER_language OR
              :OLD.IP_FIRST_number !=:NEW.IP_FIRST_number OR
              :OLD.IP_LAST_number != :NEW.IP_LAST_number) THEN
                   :NEW.MODIFIED_DATE = SYSDATE
         END IF;
    END;Twinkle

  • Concat different rows column into single row field

    Hi,
    I have a table tblSite which has SiteID and SiteInvestigator. Can I concat different row base on siteID.
    SiteID -- SiteInvestigator
    1 -- x
    1 -- y
    2 -- z
    2 -- x1
    3 -- x2
    Basicaly I want data look like this,
    sitid --siteinvestigator
    1 -- x,y
    2 -- z,x1
    3 -- x2
    I want to use only sql query or create a view to get data like this. No stored procedure please.
    Can somebody help?
    Regards,
    Vinay

    this example might be of help.
    SQL> select * from tab1;
    COL1             COL2 COL3             COL4
    Sofinummer          1 occupation          1
    Sofinummer          1 occupation          2
    Sofinummer          1 occupation          3
    Sofinummer          2 occupation          1
    SQL> select col1, col2,
      2         substr(replace(max(substr(sys_connect_by_path (col3||' '||
      3                                                        col4, '-'),2)),'-',' '),1,60)
      4         as col3
      5    from tab1
      6  start with col4 = 1
      7  connect by col4 = prior col4 + 1
      8  and prior col1 = col1
      9  and prior col2 = col2
    10  group by col1, col2;
    COL1             COL2 COL3
    Sofinummer          1 occupation 1 occupation 2 occupation 3
    Sofinummer          2 occupation 1
    SQL>

  • Single-row refresh in ADF tables, with PPR

    Hello everybody. I have an application in JDeveloper 11gR2 environment.
    Here are my requirements:
    1. I have a table, each cell is an input text;
    2. Some cell must be rendered differently depending on a specific key-field (for example, input or output text)
    3. Any manual change in the key-field must result in a re-rendering of the interested row, not the entire table.
    I addressed req 2 using an af:switcher which renders either a facet or another, evaluating the key-field.
    About req 3, I tried to set auto-submit to true on key-field and then specifying partialTriggers="key-field-id" in the column component including the switcher.
    It works, with 2 issues:
    a) the main one: it refreshes the entire table (which simply disappear/reappears when I tab out of the key-field);
    b) the second one: I'd prefer not to use the auto-submit 'cause I don't want to submit anything, yet: I just want to change rendering/values of other cells.
    Any idea?
    Thanks a lot,
    Emanuele

    Hi,
    I addressed req 2 using an af:switcher which renders either a facet or another, evaluating the key-field.
    I would have used an af:inputText field and set the readOnly property to true for the read only fields. This can be done through EL
    About req 3, I tried to set auto-submit to true on key-field and then specifying partialTriggers="key-field-id" in the column component including the switcher.
    It works, with 2 issues:
    You cannot just refresh a single row. The table is stamped at rendering, which means individual rows are not represented by their own object
    Frank

  • Update multiple rows in a dynamic table Dreamweaver CS5.5

    hello there
    i want to update multiple rows which comes from a dynamic table in Dreamweaver CS5 (a loop in php) here is my Mysql table :
    sql code
    CREATE TABLE `register`.`s_lessons` (
    `lid` int( 5 ) NOT NULL ,
    `sid` int( 9 ) NOT NULL ,
    `term` int( 5 ) NOT NULL ,
    `tid` int( 5 ) NOT NULL ,
    `point` double NOT NULL DEFAULT '0',
    PRIMARY KEY ( `lid` , `sid` , `term` ) ,
    KEY `tid` ( `tid` ) ,
    KEY `point` ( `point` )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8 COLLATE = utf8_persian_ci;
    and this is my page source code:
    php file
    <?php require_once('../Connections/register.php'); ?>
    <?php
    session_start();
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $colname1_rs1 = "-1";
    if (isset($_GET['term'])) {
      $colname1_rs1 = $_GET['term'];
    $colname_rs1 = "-1";
    if (isset($_GET['lid'])) {
      $colname_rs1 = $_GET['lid'];
    $colname2_rs1 = "-1";
    if (isset($_SESSION['tid'])) {
      $colname2_rs1 = $_SESSION['tid'];
    mysql_select_db($database_register, $register);
    $query_rs1 = sprintf("SELECT s_lessons.sid, s_lessons.lid, s_lessons.term, s_lessons.tid, s_lessons.point FROM s_lessons WHERE s_lessons.lid = %s AND s_lessons.term = %s AND s_lessons.tid  = %s", GetSQLValueString($colname_rs1, "int"),GetSQLValueString($colname1_rs1, "int"),GetSQLValueString($colname2_rs1, "int"));
    $rs1 = mysql_query($query_rs1, $register) or die(mysql_error());
    $row_rs1 = mysql_fetch_assoc($rs1);
    $totalRows_rs1 = mysql_num_rows($rs1);
    $count=mysql_num_rows($rs1);
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    for ($j = 0, $len = count($_POST['lid']); $j < $len; $j++) {
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
      $updateSQL = sprintf("UPDATE s_lessons SET point=%s WHERE tid=%s, lid=%s, sid=%s, term=%s",
                           GetSQLValueString($_POST['point'] [$j], "double"),
                                GetSQLValueString($_SESSION['tid'], "int"),
                           GetSQLValueString($_POST['lid'] [$j], "int"),
                                GetSQLValueString($_POST['sid'] [$j], "int"),
                                GetSQLValueString($_POST['term'] [$j], "int"));
      mysql_select_db($database_register, $register);
      $Result1 = mysql_query($updateSQL, $register) or die(mysql_error());
      $updateGoTo = "student_lists.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>r</title>
    <link href="styles/style.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="styles/in_styles.css" rel="stylesheet" type="text/css" media="screen" />
    </head>
    <body>
    <div id="wrapper">
         <div id="header-wrapper">
         </div>
         <!-- end #header -->
         <div id="page">
              <div id="page-bgtop">
                   <div id="page-bgbtm">
                        <div id="content">
                             <div class="post">
                               <div style="clear: both;">
                            <form name="form1" id="form1" method="post" action="<?php echo $editFormAction; ?>">
                            <table border="1" align="center">
                              <tr>
                                <th>Student ID</th>
                                <th>Lesson ID</th>
                                <th>Semester</th>
                                <th>Point</th>
                              </tr>
                              <?php do { ?>
                                <tr>
                                  <td class="data"><label for="sid[]"></label>
                                  <input name="sid[]" type="text" id="sid[]" value="<?php echo $row_rs1['sid']; ?>" size="9" readonly="readonly" /></td>
                                  <td class="data"><label for="lid[]"></label>
                                  <input name="lid[]" type="text" id="lid[]" value="<?php echo $row_rs1['lid']; ?>" size="5" readonly="readonly" /></td>
                                  <td class="data"><label for="term[]"></label>
                                  <input name="term[]" type="text" id="term[]" value="<?php echo $row_rs1['term']; ?>" size="4" readonly="readonly" /></td>
                                  <td><label for="point[]"></label>
                                    <input name="point[]" type="text" id="point[]" value="<?php echo $row_rs1['point']; ?>" size="4" />                             
                              </tr>
                                <?php } while ($row_rs1 = mysql_fetch_assoc($rs1)); ?>
                            </table>
                            <p>
                              <input type="submit" name="Submit" id="Submit" value="Submit" />
                              <input type="hidden" name="MM_update" value="form1" />
                            </p>
                            </form>
                               </div>
                             </div>
                        <div style="clear: both;">
                    </div>
                        </div>
                        <!-- end #content -->
                        <!-- end #sidebar -->
                        <div style="clear: both;"> </div>
                   </div>
              </div>
         </div>
         <!-- end #page -->
    </div>
    <!-- end #footer -->
    </body>
    </html>
    <?php
    mysql_free_result($rs1);
    ?>
    All i want is that when users click on SUBMIT button values of point column in s_lessons(database table) be updated by new entries from user.
    i did my best and result with that code is :
    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 ' lid=888,  sid=860935422, term=902' at line 1
    I would appreciate any idea.
    with prior thanks

    Go to the Row Properties, and in the Visibility tab, you have "Show or hide based on an expression". You can use this to write an expression that resolves to true if the row should be hidden, false otherwise.
    Additionally, in the Matrix properties you should take a look at the filters section, perhaps you can achieve what you wish to achieve through there by removing the unnecessary rows instead of just hiding them.
    It's only so much I can help you with the limited information. If you require further help, please provide us with more information such as what data are you displaying, what's the criteria to hiding rows, etc...
    Regards
    Andrew Borg Cardona

Maybe you are looking for

  • Problems opening DNG converted file in Photoshop CS3

    I have used Adobe DNG Converter 5.4 to convert my Panasonic DMC-FX150 raw images. The conversion goes well, but the resulting file throws an error when opening in PSCS3: Could not complete your request because Photoshop does not recognize this type o

  • How to transfer FCP project on a laptop to a desktop

    Hello, I started to work on a project on my laptop. Now I'd like to transfer the project and all of the media files to my desktop to work on it there. What would be the best way to do it. Also if I wanted to work on the project later on my laptop how

  • Deleting Channels in Navigator

    Hello, In my line of work we may run multiple tests simultaneously, so in one particular test I have 5 channels that are not relevant to my test and 1 that is. My hope was to use the advanced search in Navigator to search for channels NOT named "My C

  • Changing a column collation - problems?

    Hello, I have a VFP database that was migrated to SQL Server 2012. One of the VFP table's PK's utilized uppercase and lowercase values to distinguish rows, which of course does not fly by default in SQL Server. Rather than having to redesign this par

  • How to find PDF language

    Hi experts I need to find the language of pdf content! is there any way to do this? Thanks in advance