Update the values of a specific attribute to all user tables?

Hi everyone;

I want to update a specific "ATT" attribute values in all user tables:
declare 
...
CURSOR C_TABLES IS
SELECT TABLE_NAME FROM user_tab_columns where COLUMN_NAME='ATT';
c_table user_tab_columns.TABLE_NAME%TYPE;

BEGIN

LOOP
 
   ...

  FOR c_table IN C_TABLES
  LOOP
        UPDATE c_table SET c_table.ATT=v_nouveau_nom
        WHERE c_table.ATT=v_ancien_nom;
  END LOOP;

END LOOP;
...
I got this error:
DECLARE
*
ERROR at line 1:
ORA-06550: line 32, column 16:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 32, column 2:
PL/SQL: SQL Statement ignored
What is the problem?

Thanks for your help.

Edited by: Moostiq Dec 23. 2009 14:06

Edited by: Moostiq Dec 23. 2009 14:13

Delete WHEN others block and run again.

With OTHERS WHEN that is NOT followed by a RAISE or RAISE_APPLICATION_ERROR is a bug in the code (paraphrase of Tom Kyte).

Tags: Database

Similar Questions

  • Oracle apex 5.0: not update the values in the Collection.

    Hello again,

    I have a problem in IR where content comes from the collection query.

    Now the question is when I update the value of the column in the report and click on the custom button, that it will update the value of collection and insert the updated values of the collection member in another table that works well according to my condition, but when I will apply to any word in the search bar (say books in order not to update the values of books) and tries to update the value as a result of research above requirement does not work I mean the collection is not updated. Apex. Oracle.com

    testdump/developer/Office

    All of the Suggestions!

    Thank you

    Pranav.

    Pranav.Shah wrote:

    I have a problem in IR where content comes from the collection query.

    Now the question is when I update the value of the column in the report and click on the custom button, that it will update the value of collection and insert the updated values of the collection member in another table that works well according to my condition, but when I will apply to any word in the search bar (say books in order not to update the values of books) and tries to update the value as a result of research above requirement does not work I mean the collection is not updated. Apex. Oracle.com

    testdump/developer/Office

    The "coll update" process fails with a ORA-01403: no data found error. This happens in line 11 because of the access attempt to the wwv_flow.g_f01 using the variable array subscript c who has been incremented beyond the size of the table, which is now smaller because of the IR filter applied.

    begin declare
      c pls_integer := 0;
    begin
    for c1 in (
      select seq_id,c001 from apex_collections
      where collection_name = 'MATRIX2'
      ) loop
    c:=c+1;
    apex_debug.message(c);
      apex_collection.update_member_attribute (p_collection_name=> 'MATRIX2',
      p_seq=> c1.seq_id,p_attr_number =>'2',p_attr_value=>wwv_flow.g_f01(c));
    
    end loop;
    end;
    end;
    

    I agree with fondant tabular forms on interactive reports, but you can meet your requirement as follows. In your application, see page 2.

    1 Add a column of form element hidden IR containing the sequence number of collection:

    select
        c001 col1
      , apex_item.text(2, c002) col2
      , apex_item.hidden(1, seq_id) seq
    from
        apex_collections
    where
        collection_name = 'MATRIX2'
    

    2 place the question of the hidden form in the report using the COL1 Expression HTML attribute:

    #COL1##SEQ#
    

    3. change submit to the process if it is driven by the subject table, not the existing collection:

    begin
    
      for i in 1..apex_application.g_f01.count
      loop
        apex_collection.update_member_attribute(
            p_collection_name=> 'MATRIX2'
          , p_seq=> apex_application.g_f01(i)
          , p_attr_number => '2'
          , p_attr_value=> apex_application.g_f02(i));
      end loop;
    
    end;
    
  • Help! Try to update the values of Member - but does not (completely).

    We are trying to resolve a calculation in the middle of the update of business cycle. There is a push to update existing values for an account specific forecast time scenario.

    Essentially, we want to update the value of forecast current account 56400 to 0.33 * ("56100" + "56110" + "56300" + "56310" + "56320").

    The solution is to make sure only rest of the current year, Apr - Dec, updated forecasts to date.

    Currently the rule runs, but handful of values is never get updates - I'm not doing correctly?

    relatively small cube BSO, Account (dense).

    Here is the rule of this task running

    SET CACHE HIGH;

    FIX (& those 'Forecasts', 'the current iteration","F_00000");

    "56400")

    IF (@ISMBR (& NextMonth: "Dec"));

    0.33 * ("56100" + "56110" + "56300" + "56310" + "56320");

    ENDIF ;)

    ENDFIX;

    -followed by a calc all

    I expect to update all occurrences 56400 in the fix above...

    Thanks in advance!

    Himanshu-

    You probably need...

    UPDATECALC OFF SET;

    .. Smart calc or .in there will prevent 'own' blocks to be recalculated.

  • Update the value Table B if table A the value of different

    Hi all
    I'm using Toad for Oracle and need assistance with a trigger. I have two tables tables A and B Table with some of the same fields. I want to only update the values in the array B, if the values in table A are not equal values in table B table A update. Don't update the record where the primary key of the Table equal to the foreign key in the Table B. I have a sample script below, I hope someone can give me an example, I can develop and test. Thanks for reading also.
    CREATE OR REPLACE TRIGGER AU_Table_A
    AFTER UPDATE ON Table_A
    FOR EACH ROW
    BEGIN
    If Table A :old.value != Table A :new.value
       then 
       update 
    --Update Table B value with Table A updated value
       Table B :old.value = Table A :new.value 
    where Table A primary key = Table B foreign key
    ............
    END IF;
    END;
    Published by: Nikki on December 6, 2011 07:50

    Hi Nikki,

    If I understand correctly, then maybe

    create or replace trigger au_table_a
      after update
      on table_a
      for each row
      when (old.value != new.value)
    begin
      update table_b
      set    table_b.value = :new.value
      where  table_b.foreign_key = :new.primary_key
          and table_b.value != :new.value;
    end au_table_a;
    /
    

    Note that the solution is not trying to handle NULL values. If you have NULL in to either A or B, we have to manage those specifically

    Concerning
    Peter

  • update the value of the column to the next value

    Hi all

    create table xxc_test (date of from_date, to_date date, amount, number incr_amount);

    Select 2014, 2015, 3000, the double null

    If suppose if input data in the incr_amount then let say 1000 I want to update the value with incr_amount column amount

    Select 2014, 2015, 4,000 of the double

    If not even though it is as

    Select 2014, 2015, 3000, the double null

    and must be updated to the year

    Note: I spend the year, amount,incr_amount manually (run-time)

    Post edited by: Rajesh123 Note added in the subect

    Hello

    : new.incr_amount: = 0; also use it in code.

    The condition " If : new.incr_amoun is > 0" then (sure fire or change the value only if the increment is positive. ).

    ,....

    ..

    end if;


    -Thank you

    Pavan Kumar N

  • How update the values in ValueChangeEvent...

    Hello world

    I use Jdeveloper 11.1.2.0.0.

    I have a scenario as follows. I have 2 fields like password and Confirmpassword.

    I wrote a ValueChangeListener for the password field to make some validations and I wrote an other ValueChangeListener for the field Confirmpassword inorder to compare values entered in the two fields.

    But here..., event in ValueChangeListener field Confirmpassword, iam cannot retrieve the password field value to compare.


    The reason is... ValueChangeListener is located in ApplyRequestPhase/ProcessValidationsPhase and updated the values in UpdateModelPhase values are so not updated and impossible to get in the ValueChangeListener event.


    In order to update the values of the tree of components in case of ValueChangeListener, I tried to use code below

    valueChangeEvent.getComponent () .processUpdates (FacesContext.getCurrentInstance ());


    But the values are not updated... Please suggest me to complete my scenario. Do what is necessary. Thanks in advance.


    Concerning

    Leprince















    Hello

    Change the scope of the bean to viewScope.

    Kind regards

  • How to update the value of a value in a table

    APEX - 4.1.0.00.32
    Version of DB - 10 g
    Web - OHS server architecture
    Browser - IE8
    Theme - 9

    Hello

    I have a tabular form and I want to update the value of a field using a process based on an add-on.

    the name of the column in the form of tables is (name of column P22_PROJECT_ID)

    The error I get is

    ERR-1002 unable to find point item ID 'P22_PROJECT_ID' in the application "103".

    Error unexpected, unable to find the name of the option at the page or application level.

    The field is questioned as

    Select pt.project_id P22_PROJECT_ID

    The code I'm trying to use in the process is

    : P22_PROJECT_ID: =: P10_PROJECT_ID;

    I also tried without the colon (P22_PROJECT_ID), but the application does not recognize.

    Any help would be appreciated.

    Thank you

    the tables for is on page 22?
    the project in page 10

    I think you go to page 22 page 10
    Create a new item in page 22 as p22_project_id
    Since 10 passes as a parameter the page p1o_project_id and set p22_project_id

    by default as p22_project_id

  • Update the value of DataGrid

    I have a request - it can be found at http://reactorsoft.ath.CX/projects/Cygnus_v1/Cygnus_v1.html If a reference is required.

    In this application, I have a DataGrid. What I want to do update the rightmost 3 columns based on the data entered in the Act. Column of gains. Ideally, this will be row-by-row.

    The problem I encounter is that the value in the DataGrid control is not updated quickly enough when the itemEditEnd event is raised. If I return to this line and update the value is entered, the old value will be recovered. How can I work around this problem?

    In addition, another problem I encounter is that the triggerEvent itemEndEdit event value is not give me a value. This is supposed to tell me if the installation has ended due to a mouse event or keyboard. It is also essential to what I'm trying to accomplish.

    Can anyone provide me with an isight in this? It will be very much appreciated.

    A tip: use the method callLater to ensure that the dataProvider has been updated:


    http://www.Adobe.com/2006/mxml"layout ="absolute"creationComplete =" init () ">"
       
            Import mx.events.DataGridEvent;
    Import mx.collections.ArrayCollection;
               
    [Bindable]
    private var dp:ArrayCollection;
               
    private function init (): void
    {
    var da: Array = [{id: 1, amt: 0, c1:0, c2:0}, {id: amt 2: 0, c1:0, c2:0}];
    DP = new ArrayCollection (da);
    }
               
    private void calc(evt:DataGridEvent):void
    {
    var currObject:Object = [evt.rowIndex] dp;
    currObject.c1 = currObject.amt * 2;
    currObject.c2 = currObject.amt * 1.5;
    }
    ]]>
       

       
           
               
               
               
               
           

       

       

    Hope this helps,

    Dany

  • Refresh the components within a specific line of an af:table programmatically

    How do I refresh the components within a specific line of an af:table programmatically without refreshing the entire table? _

    I have an af:table to display a view read-only object. There is a button change in the table by calling an af:popup, where the user can update the information and click on a submit button to commit its changes.
    The action of this button property is a method in a holder in the summer where
    -1: a stored procedure is called to update several tables (related to my read-only VO).
    -2: the VO is re-interviewed (refreshQueryKeepingCurrentRow() VO.)
    -3: updating of the whole table (AdfFacesContext.getCurrentInstance () .addPartialTarget (myTable))

    Is it possible to programmatically refresh some components of the current row in the table without refreshing the entire table (point 3)?

    I tried to play with the property "partialTrigger" to af: outputText (table: column: outputText), without success.

    Thank you

    Nicolas

    OK, that's a very clear answer, thank you.

    Now, first do a little optimization:

    if(!StringUtils.isStringEmpty(results) && results.equals("TRUE"))
    // should be
    if ("TRUE".equals(results))
    // since it's faster, simpler and requires one less dependency
    

    For your use case, you can say you want to always refresh the line, then you could link the table in your backing bean, retrieve the selectedRowKeys and then set the key for the current line on the model in the collection before adding the partial target. So, something like:

    Set selectedKeys = table.getSelectedRowKeys();
    assert selectedKeys.size() == 1;
    Object old = table.getRowKey();
    try
    {
        table.setRowKey(selectedKeys .iterator().next());
        addPartialTarget(outputText);
    }
    finally
    {
        table.setRowKey(old);
    }
    
    

    p.s. I checked the table rendering code to be sure and partial updating of the contents of the line must be possible without refreshing the entire table.

    Kind regards

    ~ Simon

  • How to get the values separated by commas of multiple records in table

    How to get the values separated by commas of multiple records in table

    for example

    name address age sex
    a 12 m e
    b hh 12 f
    BB c 13 h

    I need to get output as a, b, c from a query

    Use the query as below he works for me, change the names of tables and columns

    SELECT SUBSTR (SYS_CONNECT_BY_PATH (PROXY_EMAIL, ','), 2) csv FROM (SELECT PROXY_EMAIL, ROW_NUMBER () ON the rn (ORDER OF PROXY_EMAIL), COUNT (*) NTC (STARS_PROXY_ASSIGNMENT) WHERE EMPLID = #EMPLID) WHERE rn = cnt START WITH rn = 1 CONNECT BY rn = rn + 1 ADVANCE

  • HOW automatically update the values of the attributes in a VO?

    Hi, experts,

    In jdev12.1.3

    There are two attributes in the original Version, when the line is created or updated and sent, these attributes should be updated automatically:

    1 revise_date: the current datetime object is defined on it;

    2 revisor: employee name of the user who is a field in the page will be defined on it.

    I rewrote the code for RowImpl.java of the VO as java:

    public Date getReviseDate()

    {

    return ((Row.EFFDT_UPDATE_CHANGE_INSERT_MODE == this.getETask () .getEntityState ())

    || ((Row.STATUS_NEW == this.getETask () .getEntityState ())) ? (Date) Date.getCurrentDate ():

    GetAttributeInternal (REVISEDATE) (date);

    }

    But it did not work as I hope. What is wrong with him?

    In addition, in order to set the value of revisor, how do I bind values of a reference of a jsf in RowImpl.java of the VO page

    Thank you!

    Or you can update specific attributes in the method DO DML in your EO Impl class

    Oracle ADF and Jasper ireport tips: overview of the ADF OT and VO classes

    Ashish

  • Update the value of the node with particular attribute

    Hello
    Oracle 11g
    I have a table with the following structure:
    create table xml_test (test_id varchar2(12), xml_done xmltype);
    The xml_done column uses the following structure (example XML):
    <meas id="test">
      <data-elements>
        <data-element id="abc">
          <value>1</value>
        </data-element>
        <data-element id="def">
          <value>2</value>
        </data-element>
        <data-element id="ghi">
          <value>3</value>
        </data-element>
      </data-elements>
    </meas>
    I have a requirement to update the text in the < value > < / value > based on @attribute of the id in the data < item > which it is. In my code below, I'm updating the 1 value to be 'updated value'. I tried UPDATEXML without success:
    UPDATE xml_Test SET XML_DONE =
       UPDATEXML(XML_DONE,
       '/meas/data-elements/data-element/value','updated value')
       WHERE extract(xml_done, '/meas/data-elements/data-element/@id') = 'abc' 
       and test_id = 1;
    Any suggestions are appreciated, thank you very much!

    Published by: chris001 on April 25, 2013 10:14

    Hello

    The WHERE clause filters the rows in the table, not within the XML document.
    You must use an XPath predicate for this.

    SQL> create table xml_test (test_id varchar2(12), xml_done xmltype);
    
    Table created.
    
    SQL>
    SQL> insert into xml_test (test_id, xml_done)
      2  values ('1',
      3   xmlparse(document
      4  '
      5    
      6      
      7        1
      8      
      9      
     10        2
     11      
     12      
     13        3
     14      
     15    
     16  ')
     17  );
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> update xml_test
      2  set xml_done =
      3      updatexml(
      4        xml_done
      5      , '/meas/data-elements/data-element[@id="abc"]/value/text()'
      6      , 'updated value'
      7      )
      8  where test_id = '1' ;
    
    1 row updated.
    
    SQL> set long 5000
    SQL> set pages 100
    SQL> select xml_done from xml_test where test_id = '1';
    
    XML_DONE
    --------------------------------------------------------------------------------
    
      
        
          updated value
        
        
          2
        
        
          3
        
      
    
    

    If you also want to make sure that the line actually contains something to update, use XMLExists in the WHERE clause:

    SQL> roll;
    Rollback complete.
    SQL> update xml_test
      2  set xml_done =
      3      updatexml(
      4        xml_done
      5      , '/meas/data-elements/data-element[@id="abc"]/value/text()'
      6      , 'updated value'
      7      )
      8  where test_id = '1'
      9  and xmlexists(
     10        '/meas/data-elements/data-element[@id=$id]'
     11        passing xml_done
     12              , 'abc' as "id"
     13      )
     14  ;
    
    1 row updated.
    
    SQL> select xml_done from xml_test where test_id = '1';
    
    XML_DONE
    --------------------------------------------------------------------------------
    
      
        
          updated value
        
        
          2
        
        
          3
        
      
    
    

    If you are on 11.2.0.3, you can officially use XQuery Update instead.

  • Process command API, update the value of the attribute FDF

    I use oe_order_pub.process_order to create a return order and as part of the logic that I need to fill attribute FDF, I see that value is updated in their respective fields once return order is created by API, when question and check the backend, I see the value of the attribute in the field. But when I check since before its is not visible in the field.

    Once I have change the value of the attribute of front end is visible, my question is why is not visible after API has created the return order.

    Attribute is a Date field and we have defined it for use the FND_DATE4 value in the configuration of the FDF, we in R12.

    Appreciate your help on this.

    Thank you!

    Edited by: User910243567 Sep 26, 2011 08:54

    Hello

    You update OE_ORDER_HEADERS_ALL. field of CONTEXT in your script to update the attributes? If you did not update that or somehow that's getting updated with null, then you won't be able to see the attributes of the front. Let me know.

  • need to update the value of the column automatically (exists and the new value)

    Hello

    (1) I Segment1, Segment2, Segment3, Segment4, item_status (new column modified in the Temp table)

    Must update the form OFA and the DB Temp table item_status value in the column when I click APPLY to SAVE the Inserted records in the DB table and form and must register the mtl_system_items_b Segment1, Segment2, Segment3, Segment4 in which the condition

    Note: need to update automatically item_status for existing and new inserted records in the Table and the form

     Serializable[] param = {Segment1, Segment2, Segment3, Segment4
                       };
                       am.invokeMethod("InsertRecord", param);
                       row.setAttribute("SelectFlag", "N");
    

    Thank you

    Renon,

    When you write code, try to understand what makes each line. (If you don't understand all the lines, feel free to ask)

    row.setAttribute ("ItemStatus", row.getAttribute ("ItemStatus"));

    What do you think that the above line done? You try to get the value of the attribute and trying to put the same value. How is it, that will have an impact?

    You need to do 2 things.

    1. change the insertRecord method and the State of return of this method.

    Change the definition of the function:

    public String InsertRecord (String itemstyle, String itemcust, String itemsize, String itemcolor, String ordrno,

    String desc)

    Add a return statement at the end after validation.

    TR.Commit ();

    return the situation;

    }

    2 accept that status in CO and set the value to the attribute details VO.

    String status = (String)am.invokeMethod ("InsertRecord", param);

    row.setAttribute ("ItemStatus",status);

    I hope this helps.

    See you soon

    AJ

  • Passing the values in calculated fields / attributes of Siebel to OPA profile

    Hello..

    I'm evaluate OPA for one of my clients in order to replace the authority of Haley integrated Siebel 8.x. As a first step, I would like to know if we can get the values of the profile and "Calculated fields" attributes of Siebel to OPA to be evaluated in the logic of the rules. Second, can we use OPA to run different validations of Siebel BC events such as BC_PreSetFieldValue, BC_SetFieldValue, BC_PreWriteRecord? My concern is that more than once, the values that must be validated are 'in flight' and not stored in the Siebel database yet. How would such be values passed Siebel OPA?

    Are there standard guidelines when migrating to the authorization of Haley to OPA rules, specifically in conjunction with Siebel?

    Thank you...

    In regards to calculated fields - as long as fields are defined on a business component you should be able to include them in the rules of the takeover bid.

    For events such as BC_PreSetFieldValue, BC_SetFieldValue, BC_PreWriteRecord you can define, evaluate the rules against an active business object which will include the changes until they are saved in the database.

  • Maybe you are looking for