OAF-Checkbox when selected should update column in a table

Hello,
I have a requirement to add checkbox to MES Operator page and it should perform the following,
1) When MES Operator page is opened, it should read attribute1(Y/N) from table and accordingly check/uncheck checkbox.
2) When checkbox is checked/unchecked in the page, it should write Y/N to attribute1 column of a table.
I was able to successfully add the checkbox and perform the first requirement by extending the View Object.
Can someone please tell me how to proceed with the second requirement?
Thanks in advance.

Hi ,
Pls go through this thread this will definitely help you.
How to get current row value from table when press the submit button
The problem is that PPR is added through the code which is not considered as table event .
Need to go with a tricky way ,
1.) create a new seperate table region using Jdeveloper and it shud be replica of standrad once except the new ppr event addition to the check box.
2.) Hide the existing table region and create a new stacklayoutbean.
3.) this stacklayout bean will have the extend property ,there you give the complete path of new custom advanced table region.
Now you should be able to get the row refernce on the click of check box button.

Similar Messages

  • Uncheck a Checkbox when Select List Clicked

    version 4.0.2.00.06
    Hello,
    Jari helped me with a javascript function to select all options in a multi-select list when a checkbox is checked by the user.
    A bug was reported that after clicking the checkbox to select all the options in the list, if the user then clicks on a single value in the select list the checkbox is still checked.
    Would someone help me with how to uncheck the checkbox when a single value is selected in the select list after the checkbox is checked to select all of the options in the select list?
    If you need more information please let me know.
    Thanks,
    Joe

    Hi,
    Same sample as in this post
    Re: The requested URL /apex/wwv_flow.accept was not found on this server
    I did add page JavaScript
    function checkSelected(pThis,pChk,pVal){
    var self=$($x(pThis));
    var o=self.find("option");
    var s=self.find("option:selected");
    if(s.length==o.length){
      $s(pChk,pVal);
    }else{
      $s(pChk,"");
    }And to P65_EMP multiu select HTML Form Element Attributes
    onchange="checkSelected(this,'P67_SELECT_ALL','ALL')"Regards,
    Jari

  • Problem when select "software update"

    Hi guys,
    I upgraded my Tiger Server to Leopard Server last 2 weeks, but there is a problem that everytime when i select 'Software Update' in apple then it tells me this:
    "software update can't connect to the update server. Make sure you're connected to the internet, then try again.
    Software update can't check for the updates because of a network problem"
    My Leopard server connect to internet just fine. But I don't know why it keeps saying that message every time. any idea ? Thanks

    sign in and out of app store
    shut down iphone
    reset iphone
    reset network setting

  • HT4623 I am getting an error when selecting software updates. It is non descriptive. What do I do as I need to update software ?

    Getting an error when trying to select the update software option.It is non descriptive. What do I do as I need to update software ?

    Have you tried connecting to iTune to update your IOS?

  • How to find the frequently updated columns in a table

    Hi ,
    I need to find out all the columns of a tables which are frequently getting updated.
    is there any way that I can achieve this ? I am not sure if any meta data information for DML operations exist in Oracle 9 i. Any input is welcome.
    Thanks in Advance !!

    Thank u , i am thinking the same, Thanks for the suggestion.
    any other idea.... like is there any system table which we can query to get details about these dml operations on a table ?are there any kind of system audit tables in oracle where these get recorded ?

  • How add title to checkbox when select multiselect in htmlb table

    I am doing htmlb using Java and can't seem to be able to add a title to the checkbox on my table.
    I see how to get the columns in java by using the following code
    TableColumn columnA = model.getColumnAt(2);
    But I can't seem to access the column that htmlb creates for the checkbox to add a title.  I was hoping to add Delete above the box so when they selected it, boom deletes
    Does anyone know how to do this?
    I award points for good answers
    Cheers,
    Devlin

    I am doing htmlb using Java and can't seem to be able to add a title to the checkbox on my table.
    I see how to get the columns in java by using the following code
    TableColumn columnA = model.getColumnAt(2);
    But I can't seem to access the column that htmlb creates for the checkbox to add a title.  I was hoping to add Delete above the box so when they selected it, boom deletes
    Does anyone know how to do this?
    I award points for good answers
    Cheers,
    Devlin

  • Error when selecting values in column prompt

    Hi,
    I have one report in OBIEE with large filter on it, it was giving error initially, but i modified filter, i'm getting results in results tab now, but when i'm selecting values in coloumn prompt, i'm getting error.
    Error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 14023] None of the fact sources for Business Unit.BU Business Unit Code are compatible with the detail filter.
    Query is going through three dimension tables and one fact table. But in BMM layer, each dimension table is joined to 4 fact tables.
    I'm not able to resolve this error.
    Please give me any suggestions to solve this error.
    Thanks in advance.

    Hi All,
    FYI...
    This is a bug in the application.
    SR Update: There is a known issue of ODBC throwing the 26002 error when any SQL with a length of greater than 64KB characters is encountered. This has been filed as BUG 8251994.

  • TopLink inserts when it should update, unique constraint exception

    The title says most of it. I am creating a series of objects and then updating them in rapid succession. It would be great to handle all the values during the insert, but it's not possible for this process. The majority of the time, the cached object is updated correctly and no problem occurs, but every once in a while TopLink tries to re-insert the previously inserted object, instead of updating it. Obviously this throws a unique constraint exception for the PK, and boots me out of the process.
    I can refreshObject and then it works fine. I'm looking for the underlying cause though. I want to be able to use the cache!
    Thanks!!
    Aaron
    Oracle JDBC driver Version: 10.2.0.3.0
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    TopLink Release-Designation: 10g Release 3

    Hello,
    How are you obtaining these objects to update them? The likely cause is that you are running out of memory and the objects in the shared identity map are getting garbage collected due to weak references. This means that when they get registered, TopLink can't find them in the cache so assumes they are new (the default existence check is check cache).
    If this is the case, there are a few options.
    1) Increase the size of the cache for the class in question to something more appropriate for your application, or use a fullIdentyMap so nothing ever gets pushed out. Of course, a FullIdentityMap should not be used lightly as it prevents its objects from beign gc'd and has consequences to related objects as described in:
    Caching Causing Memory Leak Effect
    Both these options will require more memory resources though, so if garbage collection is running and clearing out the references because you are already low on memory, this might make GC need to run more frequently
    2) Increase the JVM memory. This assumes completely that GC is clearing out the unused weak references from your cache because it is low on memory - GC can still occur so it doesn't guarantee the problem will be any better
    3) Read in the object through the UnitofWork before making changes (instead of using RegisterObject on existing objects), use the registerExistingObject for known existing objects or use the uow mergeClone method. Merge should cause the object to be read from the database if it is not in the cache, but it depends on the existence options used
    Best Regards,
    Chris

  • Using 6.0.2 on a Mac but received a message from Government site security concerns so upgrade to Firefox 7. In (about dialogue Box when selecting Check updates, I am informed that it is up to date.New version 7 available from website . What am I to do

    I am using a Apple Mac running Snow Leopard.

    I'm not able to reproduce this. I wonder if it is being caused by a plugin or add-on.
    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that temporarily turns off hardware acceleration, resets some settings, and disables add-ons (extensions and themes).
    '''If Firefox is open,''' you can restart in Firefox Safe Mode from the Help menu:
    * Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    '''If Firefox is not running,''' you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".
    ;[[Image:SafeMode-Fx35]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, theme, or hardware acceleration. Please follow the steps in the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • Update column in one table from another

    I've got two tables:
    t1:
    con_num
    con_code
    ex
    elin
    addressee
    a few other columns
    t2:
    con_num
    con_code
    elin
    addressee
    contact
    a few other columns
    I just got about 300 rows into t2 using sqlloader, and now I need to use t2 to update t1. t1 will have 3 rows per ex||elin, but t2 can have more or less rows per elin (which is the same as ex||elin in t1). If t2 has 4 rows per one elin, then that is 4 distinct pieces of data, and I need to make sure that t1 reflects 4 rows in its ex||elin, each containing the addressee||contact from t2. So I'll need to add a row to t1, as well as update 3 rows. Is this possible with just SQL, or do I need to write PL/SQL?
    The following is the code I've been trying:
    update t1
    set t1.addressee =
    (select addressee from t2
    where t2.con_num = 'number'
    and t1.con_code = t2.con_code
    and t1.ex ||t1.elin_num = t2.elin_num)
    This code is not correct, it returns more than one row from t2. Also, I'd need to concatenate contact onto addressee with a space in the middle, not just addressee, into t1.addressee.
    Any ideas, pointers?
    Thanks!

    Forgot some info: Ora8.1.5 on win2kpro. Also, I was wanting to combine addressee||contact in the insert/update statement to differentiate one addressee from another in t1 after the data is inserted. We can have several addressees that are the same, but each one goes to a different contact for each record.
    Thanks!

  • Selecting rows as columns in sql table

    i have sql table like 
    currcode    currdesc                  mth    yr        rate
    SGD          SINGAPORE DOLLAR    01    2013      .02
    SGD          SINGAPORE DOLLAR    09    2013      .02  (suppose have rates only for jan and sept )
    RMB          CHINESE RENMINBI     01    2013      .206
    RMB          CHINESE RENMINBI     02    2013      .207
    For each currency rates for 12 months for every year
    i want to show like (user will select the year)
    currcode    currdesc                      Jan       Feb     Mar    Apr     May    Jun    Jul    Aug    
    Sept   oct   nov  Dec
    SGD          SINGAPORE DOLLAR     .02                                                    
                                .02
    RMB          CHINESE RENMINBI      .206      .207
    h2007

    you can use either of the below
    1. Using PIVOT operator
    SELECT currcode,
    currdesc,
    Yr,
    [01] AS Jan,
    [02] AS Feb,
    [03] AS Mar,
    [11] AS Nov,
    [12] AS Dec
    FROM Table t
    PIVOT (MAX(rate) FOR mth IN ([01],[02],[03],[04],..,[11],[12]))p
    2. using classical cross tab logic
    SELECT currcode,
    currdesc,
    yr,
    MAX(CASE WHEN mth = '01' THEN rate END) AS Jan,
    MAX(CASE WHEN mth = '02' THEN rate END) AS Feb,
    MAX(CASE WHEN mth = '03' THEN rate END) AS Mar,
    MAX(CASE WHEN mth = '11' THEN rate END) AS Nov,
    MAX(CASE WHEN mth = '12' THEN rate END) AS Dec
    FROM table
    GROUP BY currcode,currdesc,yr
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
    Thank u for helping. Your 2nd solution working great. But using Pivot table giving me 2 rows,
    RMB CHINESE RENMINBI
    2013 NULL
    NULL NULL
    0.206  NULL  NULL
    RMB CHINESE RENMINBI
    2013 NULL
    NULL NULL
    NULL  NULL
      0.207
    h2007
    Do you've any additional columns you've not shown in the post above?
    to change NULLs to 0 use this
    SELECT currcode,
    currdesc,
    yr,
    MAX(CASE WHEN mth = '01' THEN rate ELSE 0.00 END) AS Jan,
    MAX(CASE WHEN mth = '02' THEN rate ELSE 0.00 END) AS Feb,
    MAX(CASE WHEN mth = '03' THEN rate ELSE 0.00 END) AS Mar,
    MAX(CASE WHEN mth = '11' THEN rate ELSE 0.00 END) AS Nov,
    MAX(CASE WHEN mth = '12' THEN rate ELSE 0.00 END) AS Dec
    FROM table
    GROUP BY currcode,currdesc,yr
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Help needed: Error when trying to PPR column/component of table

    Hi!
    I tried something like this (want to have rendered command link only in selected row):
    <af:table id="myTable" ...>
       <af:column partialTrigers="myTable">
            <af:commandLink rendered="{bindings.dodajRazlogIterator.currentRowKeyString == row.rowKeyStr}}"/>
       </af:column>
    </af:table>But error occures each time I select new row:
    Oct 10, 2007 1:11:29 PM oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator handleError
    SEVERE: Server Exception during PPR, #5
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1938)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._tableContainsPprTarget(TableRenderer.java:1377)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._encodeTablePPRTargets(TableRenderer.java:386)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.encodeAll(TableRenderer.java:269)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:815)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:733)
         at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:527)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:287)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:354)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChildren(PanelGroupLayoutRenderer.java:297)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:236)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:815)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:733)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:287)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeHorizontalChild(PanelGroupLayoutRenderer.java:485)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeHorizontalChildren(PanelGroupLayoutRenderer.java:437)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:234)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:815)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:733)
         at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:69)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:282)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:354)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChildren(PanelGroupLayoutRenderer.java:297)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:236)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:815)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:733)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:287)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:218)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:445)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:168)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:815)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:733)
         at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:69)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:282)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:304)
         at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:136)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:815)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:733)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:287)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:304)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:374)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:815)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:733)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1271)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:753)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
         at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:244)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:175)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:178)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:174)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:619)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:241)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:201)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:171)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adfinternal.view.faces.webapp.rich.SharedLibraryFilter.doFilter(SharedLibraryFilter.java:135)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:284)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:69)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:284)
         at oracle.adfinternal.view.faces.activedata.ADSFilter.doFilter(ADSFilter.java:74)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:284)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:208)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:165)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:611)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:362)
         at com.evermind.server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:915)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:821)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:626)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:599)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:383)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:161)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:142)
         at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
         at java.lang.Thread.run(Thread.java:619)
    Anyone knows what is the problem?
    Thanks for any clue,
    PaKo

    blob and clob are not supported i guess. oracle is a bit sluggish when it comes to VS and MS products!

  • Fastest way to update column in all tables of schema

    In our schema we have two columns ColA and ColB common in all tables in our schema.
    Suppose these columns have values as below in all tables
    ColA     ColB     
    A1     B11     
    A12     B22     
    ABC     DEF     
    Now we have to update ColA and ColB where we have alphanumeric values in all tables, some tables have few hundred records and some tables have millions of records.
    Could you gurus suggest me with a fastest way to acheive this.
    What we are thinking is to write a procedure where we can input multiple tables which could be updated simultaneously and make a collection within procedure with following values
    ColA     ColA_R     ColB     ColB_R     
    A1     aa     B11     bb     
    A12     aaa     B22     bbb     
    ABC     No Update DEF     No Update     
    So whenever we have value matching A1 update it with value aa if we have value matching B11 update it with value bb and so on.
    Your inputs are welcome so that to acheive this in fastest manner.
    Thanks,
    Tony
    Edited by: tony29743 on Nov 9, 2010 9:15 AM

    I would be tempted to do it something like this:
    Create an index organized table for the cola updates (old_val, new_val) with a PK on old_val and another one for the colb Values. This could possibliy be a single table, depending on how many distinct values there were for cola and colb and if you are sure that "But if colA and colB have value A1 then it will be updated with aa".
    Then do the updates as an updateable join view something like:
    UPDATE (SELECT t1.cola, iot.new_val
            from tab1 t1, new_values_iot iot
            where t1.cola = iot.old_val)
    SET cola = new_valThis would require two rounds of updates, one for cola and one for colb, but they could be parallelized somewhat by distributing the tables to be updated through several pl/sql blocks each updating a different set of tables.
    You may be able to do it in a single query like:
    UPDATE (SELECT t1.cola, t1.colb, iota.new_val new_vala, iotb.new_val new_valb
            from tab1 t1, new_values_iot iota, new_values_iot iotb,
            where t1.cola = iota.old_val and
                  t1.cola = iotb.old_val)
    SET cola = new_vala,
        colb = new_valbHowever, given that you said there were some values in both cola and colb that did not require updating, that may not work since the join will fail on one of cola or colb if that value is not in the IOT, so you will not get all of the rows updated. If, and it is a big if, either both of cola and colb or neither of cola annd colb need to be updated in a single row, it might work. So, looking at your original examples (ABC and DEF do not require updates but A1 does), if there could be as case where cola = 'A1' and colb = 'DEF' then you will have to do it in two updates per table.
    John

  • Selecting a common column from multiple tables

    hi All.
    can you guys advice a best way of doing the following
    i have 60 table sin a schema 30 with a and 30 with b
    all this 60 tables have a common column Load_dt
    how can i get
    tablename,count(records),max(load_dt) from all the tables

    declare
        max_dt some_table.load-dt%type;
        cnt_recs pls_integer;
    begin
        for lrec in ( select table_name from user_tab_columns where column_name = 'LOAD_DT' )
        loop
            execute immediate 'select count(*), max(load_dt) from '||lrec.table_name       
                  into cnt_recs, max_dt;
            dbms_output.put_line(lrec.table_name||' has '||cnt_recs||' records, max_load_dt='||max_dt);
        end loop;
    end;
    /you may want/need to apply a format mask in a TO_CHAR() call on max_dt.
    There are other approaches to getting the data out - it depends on how you want to process it subsequently.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • When need to update statistics for a table

    In Sybase we use "delete statistics ", "update all statistics " and "sp_recompile ", does Oracle need to do such things in any case? Thank you!

    Modern versions have a default job to do this, which may or may not be appropriate in its settings.  Volumes have been written about it.  Version and app dependent.  Highly recommend studying Jonathan Lewis' books.
    Stored procedures automatically recompile on use, although there can be issues dependent on bad design or configuration.

Maybe you are looking for

  • Custom report scom

    Hello I would like to create a weekly report sent to e-mail me all week to include all faults that during the week and the date of closing i have scom 2012  I would appreciate your help. אם תגובתי פתרה את בעייתך - לחץ/י, על "סמן כתשובה" ליד סימן ה V

  • Re: Rational Rose product and Forte

    We use Forte 3.0 with Rational Rose 4.0 since more than one year on a medium size project (10 developers). I have not tried Rose98 with Forte, so what I have to say may or may not apply to Rose98. In general I am very satisfied with the Forte support

  • BT is blocking my forwarded emails !

    I have a problem with receiving emails which are forwarded from the domain name I own. That is I have an email address such as [email protected] which is forwarded to my BT email address such as [email protected]. In email testing I can, and othe

  • Shared Photo Stream problem

    I have setup a couple of shared photostreams and these have been accessed ok by my wife on her iPad.  However my Mother is getting "Cannot find photo stream details.  This photo stream may have been changed or deleted" when she tries.  After publishi

  • Does the XMLP full or partially support the Xpath and XSLFO syntax?

    Does the XMLP full support the Xpath and FO syntax? or partially? Thanks