How to Update some column values in some rows in an advanced table

Hi Gurus,
Can any body help on this issue.
I am having a results table which is showing all the queried parties data queried in a seeded page in OCO module.
Lets assume the table contains 10 rows with the below columns
Party Name, Registry ID, Address Country, Match Percentage, Certification Level, Certification Reason, Internal Indicator, Status .
Certification Level, Certification Reason and Internal Indicator are the dropdowns.
The user want to update some of these fields values for some rows randomly.
After doing this if he click on Save button, Only thosed changed rows need to get update using a Custom Procedure.
But here all the rows irrespective of the change getting updated.
So  how to capture the modified rows.
Appreciate any inputs..
Thanks
Palepu
Edited by: Palepu on 9 Aug, 2012 4:25 PM

Not sure if you got the answer. You need to capture the row which got changed using the below and get the column value using the getAttribute method. This works for single selection row, if it is multi selection then you will have to loop through all selected rows and find the VO attribute value.
String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
Row currentRow = am.findRowByRef(rowReference);
String param1= (String)currentRow.getAttribute("VOAttribute");
Let me know if there are any issues.
Thanks
Shree

Similar Messages

  • How to update a column value by comparing old value by using DML Handler...

    Hi Can anyone post the DML Handler code for updating a column value by comparing the old value.
    Thanks,
    Ray

    Hi,
    Here is an example of a DML handler.
    BEGIN
    DBMS_APPLY_ADM.SET_DML_HANDLER(
    object_name => 'scott.emp',
    object_type => 'TABLE',
    operation_name => 'UPDATE',
    error_handler => false,
    user_procedure => 'strmadmin.update_column',
    apply_database_link => NULL,
    apply_name => 'MY_APPLY');
    END;
    This DML handler which will send any LCR matching the specified conditions to the strmadmin.update_column for customised processing.
    You can write the strmadmin.update_column procedure so that it extracts the old values from the LCR. You can then use the old values from the LCR to identify the row in the table. Once you identify the row, you can update it as you want.
    I haven't really tried to do any customised processing using DML handlers, but this should work.
    Hope this is of help.
    Sujoy

  • How to update the null values to some number on the NUMBER type of column

    Hello All,
    I have one NUMBER type of column in DB table. It has some (null) values. I want to update with value 1. I tried to run the Update statement , It gives 0 rows updated.
    SELECT objectid,attr20 FROM table;
    object id attr20
    ====== ====
    fff70b67-8d54-4ad7-bc57-7b40a0d8b219     (null)
    cac5264a-b363-487b-bfe6-6b84d60064e9     (null)
    2fc2a626-51d8-401c-9495-18aacd4c35c8     (null)
    1b60bfa4-ff68-4488-adf6-2a83528c0e20     (null)
    1c662829-24c1-4b3c-9289-0128e170c043     5
    74f11331-545b-435f-bf4b-f57c7a6b4500     2
    c941c1ac-a18e-47ec-843c-dbe2a5b51001     0
    d7eba203-93c0-48ea-a109-9b06015ef387     0
    eba72fa3-21d8-4489-bb93-917ebbd67de2     0
    I ran following query but no success.
    UPDATE eb_tcsservfnadoc SET attr20 = 1 WHERE attr20 = NULL
    0 rows updated
    UPDATE eb_tcsservfnadoc SET attr20 = 1 WHERE attr20 = null
    0 rows updated
    UPDATE eb_tcsservfnadoc SET attr20 = 1 WHERE attr20 = ''
    0 rows updated
    UPDATE eb_tcsservfnadoc SET attr20 = 1 WHERE attr20 =' '
    Error starting at line 1 in command:
    UPDATE eb_tcsservfnadoc SET attr20 = 1 WHERE attr20 =' '
    Error report:
    SQL Error: ORA-01722: invalid number
    01722. 00000 - "invalid number"
    *Cause:   
    *Action:
    can some one help me out to update such values ????

    Hi,
    "=" will not work for NULL values. Please remeber two NULL values are NOT same. Try IS operator.
    UPDATE eb_tcsservfnadoc SET attr20 = 1 WHERE attr20 IS NULLRegards,
    Avinash

  • How to change the column value upto 68000 rows

    Hi,
    I want to change the column value.
    I have table called RefDoc
    Select distinct r.int_ref from refdoc r where r.int_ref like '\\dxb%'
    Int_Re__f
    \\dxb\Sample\BFE B777\2008\PO2025225.tif
    \\dxb\Sample\RO\SFR\26-01-2009j\RO2022098.pdf
    \\dxb\Sample\RO\SFR\26-01-2009j\RO2040831.pdf
    \\dxb\Sample\BFE B777\2008\PO2025253.tif
    \\dxb\Sample\RO\UM INV\26-01-2009\RO2018358.pdf
    up to 68000 rows
    I want to change to \\AUH instead of \\dxb.
    I want the table like
    Int_Re__f
    \\AUH\Sample\BFE B777\2008\PO2025225.tif
    \\AUH\Sample\RO\SFR\26-01-2009j\RO2022098.pdf
    \\AUH\Sample\RO\SFR\26-01-2009j\RO2040831.pdf
    \\AUH\Sample\BFE B777\2008\PO2025253.tif
    \\AUH\Sample\RO\UM INV\26-01-2009\RO2018358.pdf
    Thanks
    Nihar

    user REPLACE function and change it
    UPDATE refdoc
       SET int_ref = REPLACE(int_ref, '\\dxb\', '\\AUH\')
    WHERE int_ref like '\\dxb\%'

  • How to merge three columns values to single row values in sql server 2008

    Hi Frds.....
    I have three quantity in my table.
    Quantity1,quantity2,quantity3
    this three quantity have different values
    ex:
    quantity1 = 1000,quantity2=2000,quantity3=3000
    the three column combine 2 display in single row values. this values display in one by one.
    ex: quantity
         1000
         2000
         3000

    You will need to use the UNPIVOT operator:
    DECLARE @example TABLE
    Id int NOT NULL IDENTITY(1,1),
    Quantity1 int,
    Quantity2 int,
    Quantity3 int
    INSERT INTO @example VALUES (1000, 2000, 3000), (4000, 5000, 6000);
    SELECT * FROM @example;
    SELECT Id, Quantity, QuantityType
    FROM @example
    UNPIVOT
    Quantity FOR QuantityType IN (Quantity1, Quantity2, Quantity3)
    ) AS u;
    Output:
    (2 row(s) affected)
    Id Quantity1 Quantity2 Quantity3
    1 1000 2000 3000
    2 4000 5000 6000
    (2 row(s) affected)
    Id Quantity QuantityType
    1 1000 Quantity1
    1 2000 Quantity2
    1 3000 Quantity3
    2 4000 Quantity1
    2 5000 Quantity2
    2 6000 Quantity3
    (6 row(s) affected)

  • Concatenate a column value across multiple rows - PDW

    We are using PDW based on SQL2014. We require an efficient logic on how to concatenate a column value across multiple rows. We have the following table
    T1
    (CompanyID, StateCD)
    Having following rows:
    1              NY
    1              NJ
    1              CT
    2              MA
    2              NJ
    2              VA
    3              FL
    3              CA
    We need a code snippet which will return following result set:
    1                    
    CT,NJ,NY
    2                    
    MA,NJ,VA
    3                    
    CA,FL
    We have tried built-in function STUFF with FOR XML PATH clause and it is not supported in PDW. So, we need a fast alternative.

    Hi Try this:
    SELECT * INTO #ABC
    FROM 
    SELECT 1 AS ID,'NY' AS NAME
    UNION 
    SELECT 1 AS ID,'NJ' AS NAME
    UNION 
    SELECT 1 AS ID,'CT' AS NAME
    UNION 
    SELECT 2 AS ID,'MA' AS NAME
    UNION 
    SELECT 2 AS ID,'NJ' AS NAME
    UNION 
    SELECT 2 AS ID,'VA' AS NAME
    UNION 
    SELECT 3 AS ID,'FL' AS NAME
    UNION 
    SELECT 3 AS ID,'CA' AS NAME
    )A
    CREATE TABLE ##CDB (ID INT, NAME NVARCHAR(800)) 
    DECLARE @TMP VARCHAR(MAX), 
            @V_MIN INT,
    @V_MAX INT,
    @V_COUNT INT
    SELECT @V_MIN=MIN(ID),@V_MAX=MAX(ID) FROM #ABC 
    SET @V_COUNT=@V_MIN
    WHILE @V_COUNT<=@V_MAX
    BEGIN
    SET @TMP = '' SELECT @TMP = @TMP + CONVERT(VARCHAR,NAME) + ', ' FROM #ABC 
    WHERE ID=@V_COUNT
    INSERT INTO ##CDB (ID, NAME) SELECT @V_COUNT AS ID ,CAST(SUBSTRING(@TMP, 0, LEN(@TMP)) AS VARCHAR(8000)) AS NAME 
    SET @V_COUNT=@V_COUNT+1
    END
    SELECT * FROM ##CDB
    OR
    SELECT * INTO #ABC
    FROM 
    SELECT 1 AS ID,'NY' AS NAME
    UNION 
    SELECT 1 AS ID,'NJ' AS NAME
    UNION 
    SELECT 1 AS ID,'CT' AS NAME
    UNION 
    SELECT 2 AS ID,'MA' AS NAME
    UNION 
    SELECT 2 AS ID,'NJ' AS NAME
    UNION 
    SELECT 2 AS ID,'VA' AS NAME
    UNION 
    SELECT 3 AS ID,'FL' AS NAME
    UNION 
    SELECT 3 AS ID,'CA' AS NAME
    UNION 
    SELECT 5 AS ID,'LG' AS NAME
    UNION 
    SELECT 5 AS ID,'AP' AS NAME
    )A
    CREATE TABLE ##CDB (ID INT, NAME NVARCHAR(800)) 
    DECLARE @TMP VARCHAR(MAX), 
            @V_MIN INT,
    @V_MAX INT,
    @V_COUNT INT
    SELECT @V_MIN=MIN(ID),@V_MAX=MAX(ID) FROM #ABC 
    SET @V_COUNT=@V_MIN
    WHILE @V_COUNT<=@V_MAX
    BEGIN
    SET @TMP = '' SELECT @TMP = @TMP + CONVERT(VARCHAR,NAME) + ', ' FROM #ABC 
    WHERE ID=@V_COUNT
    SELECT @V_COUNT AS ID ,CAST(SUBSTRING(@TMP, 0, LEN(@TMP)) AS VARCHAR(8000)) AS NAME INTO #TEMP 
    INSERT INTO ##CDB (ID, NAME) SELECT ID, NAME FROM #TEMP WHERE NAME<>''
    DROP TABLE #TEMP
    SET @V_COUNT=@V_COUNT+1
    END
    SELECT * FROM ##CDB
    Thanks Shiven:) If Answer is Helpful, Please Vote

  • Workflow changing the status based some columns value

    OOB workflow SP  designer 2013
    The workflow purpose is change the status columns from
    COMPLETE to IN PROGRESS or from
    IN PROGRESS to COMPLETE according some columns value.. And if the change is from
    IN PROGRESS to COMPLETE
    there will be change in some columns like
    If alertSOP Date <= today then change the status (Columns value) from Complete to In Progress and send email to the manager (the manager email address is a column (Manager Email)
    Else pause until the alert date=Today()
    If the status (columns) = in progress send Remainder email every 10 days
    If the status change from in progress to
    Complete (BY MANAGER MANUALLY) then
     last renewed Date =TODAY()
    Valid to Review=TODAY() + 4 MONTH
     Alert  Date=today() + 5 month
    and  Due Date=today() + 6 months
    AND START THE WORKFLOW AFTER UPDATING THIS COLUMNS FOR NEXT cycle
    SharePoint List(http://server/site/..) LIST ITEMS
    Department
    Contractor
    Division
    Manager Email
    Contractor last renewed Date
    Contractor Valid to Review
    Alert SOPReview
    DueDate Review
    Status
    Workflow Status
    ABC
    JONAH
    10
    [email protected]
    01/01/2014
    05/06/2014
    5/07/2014
    5/08/2014
    COMPLETE
    paused 
    DEF
    SMITH
    20
    [email protected]
    01/01/2014
    02/03/2014
    2/28/2014
    3/20/2014
    INPROGRESS
    INPROGRESS
    Note:
    The status is changed manually by manager from IN PROGRESS TO COMPLETE
    The status from COMPLETE to IN PROGRESS is changed by event or Triggers  (based the alert date) 

    The First Part are coded as follow
    (The workflow purpose is change the status columns from COMPLETE to IN
    PROGRESS or fromIN PROGRESS to COMPLETE according
    some columns value.. And if the change is from IN
    PROGRESSto COMPLETE there
    will be change in some columns like
    If alertSOP Date <= today then change the status (Columns value) from Complete to In Progress and send email to the manager (the manager email address is a column (Manager Email)
    Else pause until the alert date=Today()
    If the status (columns) = in progress send
    Reminder email every 10 days)
    Note:
    The first if Block work as expected
    the second if block generate error.. Internal States Canceled
    RequestorId: 3b262286-66e8-5f9f-09f8-3b09c5be0ebc. Details: System.ApplicationException: HTTP 400 {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["1"],"SPClientServiceRequestDuration":["1997"],"SPRequestGuid":["3b262286-66e8-5f9f-09f8-3b09c5be0ebc"],"request-id":["3b262286-66e8-5f9f-09f8-3b09c5be0ebc"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1;
    RequireReadOnly"],"MicrosoftSharePointTeamServices":["15.0.0.4420"],"Cache-Control":["max-age=0, private"],"Date":["Tue, 25 Mar 2014 21:25:35 GMT"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext
    context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager
    bookmarkManager, Location resultLocation)

  • How to update zero to a column value when record does not exist in table but should display the column value when it exists in table?

    Hello Everyone,
    How to update zero to a column value when record does not exist in table  but should display the column value when it exists in table
    Regards
    Regards Gautam S

    As per my understanding...
    You Would like to see this 
    Code:
    SELECT COALESCE(Salary,0) from Employee;
    Regards
    Shivaprasad S
    Please mark as answer if helpful
    Shiv

  • Hi, how can i break the value for a row and column once i have converted the image to the array?????​??

    Hi, I would like to know how can i break the value for a row and column once i have converted the image to the array. I wanted to make some modification on the element of the array at a certain position. how can i do that?
    At the moment (as per attachhment), the value of the new row and column will be inserted by the user. But now, I want to do some coding that will automatically insert the new value of the row and the column ( I will use the formula node for the programming). But the question now, I don't know how to split the row and the column. Is it the value of i in the 'for loop'? I've  tried to link the 'i' to the input of the 'replace subset array icon' , but i'm unable to do it as i got some error.
    Please help me!
    For your information, I'm using LABView 7.0.

    Hi,
    Thanks for your reply.Sorry for the confusion.
    I manage to change the array element by changing the row and column value. But, what i want is to allow the program to change the array element at a specified row and column value, where the new value is generated automatically by the program.
    Atatched is the diagram. I've detailed out the program . you may refer to the comments in the formula node. There are 2 arrays going into the loop. If a >3, then the program will switch to b, where if b =0, then the program will check on the value of the next element which is in the same row with b but in the next column. But if b =45, another set of checking will be done at a dufferent value of row and column.
    I hope that I have made the problem clear. Sorry if it is still confusing.
    Hope you can help me. Thank you!!!!
    Attachments:
    arrayrowncolumn2.JPG ‏64 KB

  • How To Concatenate Column Values from Multiple Rows into a Single Column?

    How do I create a SQL query that will concatenate column values from multiple rows into a single column?
    Last First Code
    Lesand Danny 1
    Lesand Danny 2
    Lesand Danny 3
    Benedi Eric 7
    Benedi Eric 14
    Result should look like:
    Last First Codes
    Lesand Danny 1,2,3
    Benedi Eric 7,14
    Thanks,
    David Johnson

    Starting with Oracle 9i
    select last, first, substr(max(sys_connect_by_path(code,',')),2) codes
    from
    (select last, first, code, row_number() over(partition by last, first order by code) rn
    from a)
    connect by last = prior last and first = prior first and prior rn = rn -1
    start with rn = 1
    group by last, first
    LAST       FIRST      CODES                                                                                                                                                                                                  
    Lesand         Danny          1,2,3
    Benedi         Eric           7,14Regards
    Dmytro

  • How to refer a column value of a single row in conditional column display?

    Hello,
    does anybody have an idea, how i can refer a column value of a single row in conditional display of a column?
    So my idea is, that a report has a column, which value is only displayed, when another column value of this row has a specific value.
    I want to solve this problem with condition type: PL/SQL Function Body returning a boolean.
    But I do not know how to refer the column value of each single row!
    Thank you,
    Tim

    Here's a solution that, to me, seems easier to implement but, that's, of course, in the eye of the implementer.
    Rather than using APEX to generate a link column for you, actually create the link as part of your SQL.
    select '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>' CONTACT_LINK, ...
    etc.
    Test this out. You'll see that it works just like making a column a link using the column attributes.
    Next, we'll change the SQL to use a DECODE statement to either display the link or nothing depending on what your criteria is. For example, let's assume you only want a link for active contacts.
    select Decode( CONTACT_STATUS, 'A', '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>', NULL ) CONTACT_LINK, ...
    etc.
    This will not display the link in any rows in which the CONTACT_STATUS is not active, i.e. "A"
    -Joe

  • How to get the column values

    hi
    i am new to programming... i would like to know how to get the column values... i have a resultset object
    i need code .... asap
    thnx

    @OP: It is always good to type complete sentences and describe your problem at length. It helps in letting people know what you really need instead of making wild guesses or silly jokes. You post mentions that you get the ResultSet. Then you should look up the API docs for java.sql.ResultSet and take a look at the getxxx() method signatures. Use the ones which suit the specific case.
    Besides, it is good to refrain from using asap and urgent. Even if something is urgent to you, it need not be urgent to others. Wording a question properly would attract better replies.
    Finally, would you mind getting down to specifics of your problem? From what I perceived, the JDBC tutorial and the API docs should provide all the information you need.

  • Is it possible to Lock just one column value in a row?

    Is it possible to Lock just one column value in a row
    A Java Developer has just asked me if it is possible to Lock just one column value in a row in Oracle
    select ename from emp where empno=7369 for update;
    EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    7369 SMITH      CLERK           7902 17-DEC-80        800                    20
    will lock the entire row with empno=7369.
    But is it possible to lock one column value from this row, like SAL=800 ?
    Edited by: J.Kiechle on Jan 8, 2009 10:45 PM

    J.Kiechle wrote:
    Is it possible to Lock just one column value in a rowNo. Locking granularity is a row.

  • Using column value is it possible to find the table name in the database?

    Hi all,
    using column value is it possible to find the table name in the database?
    guys i need the table value
    Note:
    oracle-9i
    for example:
    i don't know NIC(column value) in which table in the database.
    Thank you,
    with regards,
    JP.
    Edited by: Guest on Feb 27, 2012 5:42 AM

    Hi,
    As far as I understand what you are asking for I would suggest 4 data dictionaries that will help you to know the table name from the column names
    1. USER_TAB_COLS
    2. ALL_TAB_COLS
    3. DBA_TAB_COLS
    4. COLS
    These can give you detail information about the columns and respective tables at user, schema, dba level. Further information on the table can be found by querying ALL_OBJECTS table giving table_name as Object_name, or you can join the data dictionaries too.
    To know about various data dictionaries avalible in Oracle please query select * from cat;
    Let us know if you need further assistance.
    Twinkle

  • ADF 11g Partial Triggers Row Column Update By Column in the Same Row

    Hi.
    I have a situation whereby I have a checkbox in a table row, which has an eventchangelistener, which upon activation, trys to update another column in the same row. I can not get this to work through partial triggers, even though I have set up my ids up correctly. The row though can be updated by a command button outside of the table using the same coding techniques, but I need it updated via the checkbox.
    Is there a limitation in updating a column within a row, from another row column's event change listener.
    Thanks.

    Updating the other rows from the checkbox works fine for me. Here is what I did.
    I DnD Emp table with a new column that says if the emp is new hire. If the checkbox is checked, I set Firstname and Lastname for that row as NewHire. I have partial triggers on Firstname and Lastname columns to update whenever checkbox is checked/unchecked and autosubmit on checkbox to true. Hope this helps.
    Try adding column selection property to single and see if it helps.
    Edited by: asatyana on Jan 16, 2012 12:48 AM
    Edited by: asatyana on Jan 16, 2012 12:49 AM

Maybe you are looking for

  • Vector can't give objects

    I have a program using a vector, I store BufferedImage objects in it. But when I try to access them later the compiler won't let me because the method in Vector defines that Object is the type of object being passed, and cannot convert it to a Buffer

  • [SOLVED] Archiso: problem with script build.sh

    Hi guys, i have this problem when I run ./build.sh, cp: cannot create hard link ‘work/root-image/usr/src/linux-3.11.6-1-ARCH/vmlinux’ to ‘work/i686/root-image/usr/src/linux-3.11.6-1-ARCH/vmlinux’: Invalid cross-device link cp: cannot create hard link

  • I've asked this before, but the spinning wheel is still there and sometimes it freezes up to where I have to shut it down manually.

    I've asked this before, but the spinning wheel is still there and sometimes it freezes up to where I have to shut it down manually.  Can someone tell me how to fix this!! I dont really know how to find certain places to check on things.

  • Maximum length of the table

    Hi, I created one table, in that table i have 101 field, total length of the table is 430, but i could not able to create 102nd field because it's saying total length of the table is exceed. How i can increase table length?

  • Configuration of bank accounts

    Hello, I was trying to do configuration for house banks and i came accross a field called account modification while assigning accounts to account symbol.  why is this field used for? and what is the purpose of this field. Thanks