Update a column to keep the old values and by adding a new

I have to update a column...

Select * from test;

TYPE_TEXTE RULE_NBR
-----------------------------------
30 AAX, AAR, AAV, AAB, AAK
40 BBD, WWN, AAF, AAB, AAK

now, I have to add BBB, WWW where rule_nbr = 30 and CCC, TTT where rule_nbr = 40

so this stmt update will do...


UPDATE TEST
Type_texte SET = "AAX, AAR, AAV, AAB, AAK, BBB, WWW.
WHERE rule_nbr = '30';


Update test
Set the argument type_texte = "BBD, WWN, AAF, AAB, AAK, CCC, TTT.
where rule_nbr = '40';


I was wondering is there an another way to update the same

LPS says:
UPDATE TEST
SET Type_texte = concat (type_text, 'BBB, WWW')
WHERE rule_nbr = '30';

Update test
Set the argument type_texte = concat (type_text, 'CCC, TTT')
where rule_nbr = '40';

Check your answer ;) should be concat(type_text,',BBB,WWW') or type_texte |', BBB, WWW'
You missed the point.

See you soon,.
Manik.

Tags: Database

Similar Questions

  • To get the old value and the new value

    create table test (ID NUMBER,
    Number of REV,
    Number FIELD_ID,
    FieldName varchar2 (200),
    ACTION varchar2 (50).
    Field_value varchar2 (200),
    MODIFIED_BY varchar2 (50).
    Date MODIFIED_DATE);

    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1007,283,12,'status','UPDATE','Started','2002',to_date('13-DEC-13','DD-MON-RR'));
    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1007,224,12,'status','UPDATE','preview','2002',to_date('12-DEC-13','DD-MON-RR'));
    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1007,290,12,'status','UPDATE','revision','2002',to_date('14-DEC-13','DD-MON-RR'));


    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1008,283,12,'status','UPDATE','Started','2002',to_date('13-DEC-13','DD-MON-RR'));
    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1008,224,12,'status','UPDATE','preview','2002',to_date('12-DEC-13','DD-MON-RR'));
    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1008,290,12,'status','UPDATE','teststat','2002',to_date('14-DEC-13','DD-MON-RR'));

    1007 283 12 status of started the UPDATE 2002 13 December 13
    1007 224 12 status update overview 2002 12 December 13
    12 290 1007 State review UPDATED 2002 December 14, 13
    1008 283 12 status of started the UPDATE 2002 13 December 13
    1008 224 12 status update overview 2002 12 December 13
    1008 290 12 intensified status 2002 Update December 14, 13

    I need to Get for each id for each field Ineed to get the old value and new_value.


    Planned result for the simulacrum of the data is:

    ID FIELD_NAME ACTION OLD_FIELD_VALUE NEW_FIELD_VALUE MODIFIED_BY MODIFIED_DATE
    1007 status UPDATE started review 2002 December 14, 13
    1008 State updated started intensified 2002 December 14, 13


    Thank you
    Ann

    Hello

    9728f65c-CE79-4c28-9efb-9e76dc6eaf8b wrote:

    Yes I need a production line for all id.the the last rows should be the one with the highest rev.

    Then use id where I guessed a group of columns starting with id and rev in most of the places where I used modifed_date:

    WITH got_analytics AS

    (

    SELECT id, field_name, action

    LAG (field_value) over (PARTITION BY ID.

    ORDER BY rev

    ) AS old_field_value

    field_value AS new_field_value

    modified_by

    modified_date

    rev

    MAX (rev) over (PARTITION BY id)

    AS max_rev

    OF the test

    )

    SELECT id, field_name, old_field_value, new_field_value, modified_by, modified_date

    OF got_analytics

    WHERE rev = max_rev

    ORDER BY id

    ;

  • Get the old value and the new value based on the date

    Hello

    I have a table called list created below with the rest of the insert statements.

    CREATE TABLE ROSTER
    (
    NUMBER OF ROSTER_EMPLOYEE_DEF_ID
    NUMBER OF EMPLOYE_ID
    NUMBER OF DEFINITION_REGION_CODE
    NUMBER OF DEFINITION_DISTRICT_CODE
    NUMBER OF DEFINITION_TERRITORY_CODE
    START_DATE DATE,
    END_DATE DATE
    )



    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (1,299,222,333,444, 'JUNE 1, 2011', 30 JUNE 2011 "")

    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (2,299,223,334,445, "1 JULY 2011', JULY 20, 2011" "")

    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (3,299,224,335,446, 'AUGUST 1, 2011', AUGUST 30, 2011 "")

    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (4,300,500,400,300, 'JUNE 1, 2011', JUNE 20, 2011 "")

    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (5,300,501,401,301, "1 JULY 2011', JULY 20, 2011" "")


    In the table above we have columns like

    EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE

    The result I'm looking for the table above is based on the employe_id OF start_date AND end_date

    I need to get the OLD_DEFINITION_REGION_CODE and the NEW_DEFINITION_CODE
    Similarly, OLD_DEFINITION_REGION_CODE and the NEW_DEFINITION_REGION_CODE
    and OLD_DEFINITION_TERRITORY_CODE and the NEW_DEFINITION_TERRITORY_CODE


    I need to get a row of data for each employee saying old value and the new value

    for the employee 299 there are 3 records he puts the new record which is the latest date is to say beginning August 1, 2011 and end date of recordings old 30 August 2011
    beginning July 1, 2011 and July 20, 2011


    For the data in the table above, I need to get the data as below


    EMPLOYE_ID OLD_DEFINITION_REGION_CODE NEW_DEFINITION_CODE OLD_DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE START_DATE END_DATE
    299 223 224 334 335 20 JULY 11 30 AUG 11
    300 500 501 400 401 20 JUNE 11 JULY 20, 11


    Please suggest me to get the result above, based on the data. Please let me know if my messages are not clear


    Thank you
    Sudhir
    SELECT  EMPLOYEE_ID,
            OLD_DEFINITION_REGION_CODE,
            NEW_DEFINITION_REGION_CODE,
            OLD_DEFINITION_DISTRICT_CODE,
            NEW_DEFINITION_DISTRICT_CODE,
            OLD_DEFINITION_TERRITORY_CODE,
            NEW_DEFINITION_TERRITORY_CODE,
            START_DATE,
            END_DATE
      FROM  (
             SELECT  EMPLOYEE_ID,
                     ROW_NUMBER() OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE DESC) RN,
                     LAG(DEFINITION_REGION_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_REGION_CODE,
                     DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE,
                     LAG(DEFINITION_DISTRICT_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_DISTRICT_CODE,
                     DEFINITION_DISTRICT_CODE NEW_DEFINITION_DISTRICT_CODE,
                     LAG(DEFINITION_TERRITORY_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_TERRITORY_CODE,
                     DEFINITION_TERRITORY_CODE NEW_DEFINITION_TERRITORY_CODE,
                     LAG(END_DATE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) START_DATE,
                     END_DATE
               FROM  ROSTER
            )
      WHERE RN = 1
    /
    
    EMPLOYEE_ID OLD_DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE OLD_DEFINITION_DISTRICT_CODE NEW_DEFINITION_DISTRICT_CODE OLD_DEFINITION_TERRITORY_CODE NEW_DEFINITION_TERRITORY_CODE START_DAT END_DATE
    ----------- -------------------------- -------------------------- ---------------------------- ---------------------------- ----------------------------- ----------------------------- --------- ---------
            299                        223                        224                          334                          335                           445                           446 20-JUL-11 30-AUG-11
            300                        500                        501                          400                          401                           300                           301 20-JUN-11 20-JUL-11
    
    SQL>  
    

    SY.

  • Transfer values of ROWTYPE in ROWTYPE with different COLUMN specifications. keeping the Default_Data values

    Hello

    I have a problem on dynamically the transfer values of different columns in two variables given rowtype type.

    My intention is to transfer values from table1 into table2.

    Basically, I stated to vars of v_table1 and v_table2% rowtype, each of them contains columns with the same, and also the individual column names.

    v_table2% rowtype must be initialized with default values.

    I would like to insert v_table2 values in table2 later by practice 'INSERT INTO TABLE2 VALUES v_table2'.

    Before inserting, I need to change several values of column by different rules, but these rules are not relevant for my actual demand.

    The point is, how can I transfer the values of v_table1 in v_table2 for the hanving of columns with the same column name, without hard-coding the names of columns, because these two tables contain many columns.

    In addition values initialized with v_table2 default_data values should not be overwritten by data does not exist in the same named column of v_table1.

    Example: If v_table1. D is NULL, it should not replace the default value initialized former "Monday".

    Conditions:

    Table 1 contains the following values:

    Column name Value
    A'1'
    B'2'
    CNULL VALUE
    D'somedata '.
    ENULL VALUE
    F« 3 »

    After the transfer of the values of v_table1 in v_table2, I guess that the following data:

    Column name Value Source
    CNULL VALUETable1.C
    D'somedata '.Table1.D
    E"Tuesday".DATA_DEFAULT from Table2
    F« 3 »Table1.F
    GNULL VALUE
    HNULL VALUE

    Right now I am already able to fill the v_table2 with the default values:

    declare
      lv_query varchar2(1000);
      
      type cur_typ is ref cursor;
      rcur_typ cur_typ;
      
      v_table2 table2%rowtype;
    
    begin
        for rec in (select *
                    from user_tab_columns
                    where table_name = 'TABLE2'
                    order by column_id
                    )
        loop
          if rec.data_default is null then
              lv_query := lv_query||', null';
            elsif rec.data_type = 'NUMBER' then
              lv_query := lv_query||', '||rec.data_default;
            elsif rec.data_type = 'DATE' then
              lv_query := lv_query||', '||rec.data_default;
            else
              lv_query := lv_query||', '||rec.data_default||'';
          end if;
        end loop;
        
        lv_query := 'SELECT'||substr(lv_query, 2)||' FROM DUAL';
        dbms_output.put_line(lv_query);
        
        open rcur_typ for lv_query;
        fetch rcur_typ into v_table2;
        close rcur_typ;
    end;
    

    I have no idea how to achieve the transfer of v_table1 to v_table2 without substitute default values of table2.


    As far as I know I can find these columns with column names by querying:

    select column_name from user_tab_cols where table_name='TABLE1' intersect select column_name from user_tab_cols where table_name='TABLE2'
    

    Maybe you can give me some advice.

    Thank you very much.

    Sample data:

    CREATE TABLE "TABLE1" 
       (    "A" VARCHAR2(20 BYTE), 
        "B" VARCHAR2(20 BYTE), 
        "C" VARCHAR2(20 BYTE), 
        "D" VARCHAR2(20 BYTE), 
        "E" VARCHAR2(20 BYTE), 
        "F" VARCHAR2(20 BYTE)
       );
    
      CREATE TABLE "TABLE2" 
       (    "C" VARCHAR2(20 BYTE), 
        "D" VARCHAR2(20 BYTE) DEFAULT 'Monday', 
        "E" VARCHAR2(20 BYTE) DEFAULT 'Tuesday', 
        "F" VARCHAR2(20 BYTE) DEFAULT 'Wednesday', 
        "G" VARCHAR2(20 BYTE) DEFAULT 'Thursday', 
        "H" VARCHAR2(20 BYTE)
       );
    
    INSERT INTO "TABLE1" (A, B, D, F) VALUES ('1', '2', 'somedata', '3');
    
    INSERT INTO "TABLE1" (A, B, D, F) VALUES ('1', '2', 'somedata', '3');
    

    Banner:

    Oracle Database 11 g Release 11.2.0.3.0 - 64 bit Production

    PL/SQL Release 11.2.0.3.0 - Production

    CORE Production 11.2.0.3.0

    AMT for Linux: Version 11.2.0.3.0 - Production

    NLSRTL Version 11.2.0.3.0 - Production

    You can build a dynamic query that checks the values of all columns in the table 1,

    and if a column contains null, then retrieves the default value of the column in table2,

    or null if this column doesn't have a default vallue.

    Something like this pseudocode

    SELECT
       if column A is not null then take A from table1, else take default for column A from table2
       .....
       if column X is not null then take A from table1, else take default for column X from table2
    FROM table1
    

    The default budget can be extracted from USER_TAB_COLUMNS

    select column_name, data_default from user_tab_columns
    where table_name = 'TABLE2'
    order by column_id
    ;
    
  • How can I change the CPU, motherboard and upgraded to Windows 7 while keeping the old HD and all data on hard drive?

    I am running a Pentium Q9300 with Windows Vista. I have change my mother and put card at level of CPU of AMD Phenom II X 4 965. I bought a new copy of Windows 7. I need to update all those things while maintaining the old hard drive. Well, I don't know how to do it without other wipe the HD, fitness with an upgrade of the OS, or a link is not my new Windows 7 to my old hardware configuration. I need to keep all programs, files, folders, and data I have on the hard drive.

    How can I do all three and the link to my new Windows 7 for my new hardware?

    Hello

    You can not do

    the old hard disk contains the drivers for the motherboard that is old and in all likelihood will not start when it is installed with the new motherboard

    a clean install is normally required when changing motherboards

    __________________________________________________________

    and I think that you should also read this on the granting of licences and motherboards:

    If you have a license to OEM preinstalled, DELL, HP, etc any update at the Board level or changes must be done jointly with the computer manufacturer

    an OEM license is linked to the original tho hardware it is installed on this computer life

    When the computer dies the license dies with him, unless the manufacturer is willing to help you

    If you have a retail license and reactivation problems:

    1. click on start and in the search for box type: slui.exe 4

    2. press enter on your keyboard

    3. Select your country.

    4. take the phone activation option and brace yourself for a real person instead of the automatic fast process

    ·                        When you do the phone activation process hang to a real person explain to, instead of the following prompts for automatic scenario

    -------------------------------------------------------------------------------------------------

    How to find a phone number for a Microsoft Product Activation Center

    http://support.Microsoft.com/kb/950929

  • He had to capture the old value and new values using the oracle audit trail

    Hello

    I put the parameter audit_trail for db, extended. I am in treatment of the LMD. I need to display the values changed by these instructions DML audit trail stored in dba_audit_trail. How can I achieve the same?

    Kindly guide me.

    If you want images of column of the table target before and after then the native audit function is probably not your best option. I think that you want to set triggers to audit for the insert tables and write either the CDC or duplicate lines in a historical table of change.

    HTH - Mark D Powell.

  • keep the old activation key after installing a new version of windows - no upgrade!

    I bought a new laptop with pre installed Win8. I used a new drive to win 8 teacher with activation key to improve the system.
    I was not satisfied with winning 8 and used a new version of Win 7 prof to install on the laptop.
    After security issues I want to install Win 7 Ultimate with a new available activation key - it so no need to reinstall, its enough to change the activation key.
    All OS - Windows 8 Pro, Win 7 teacher have been activated on the same notebook, what happens with these keys after using a new key for ultimate?
    How can I save my unused keys for later use? There is a lot of money has evolved with these SW!

    I have not found an answer on Microsoft, my being sites I need to call Microsoft technical support by phone.

    Thanks to the community

    I explained as well for you!

    System operating licenses in detail, that you buy and install yourself, is authorized to transfer to another machine.

    But retail licenses also can be installed on a machine at one time.

    If you clean the hard drive and take the operating system/product at retail a key machine, you can reinstall the license of retail on another machine and reactivate.

  • Problem LOV... Turning the display value and no key-value

    Hello. Sorry for my bad English.

    I have a problem with LOV dynamic pop up.

    I have a simple form called nom_element and item_code containing the form A. users can create, update, and delete a new item using this form.
    Another form called form B has a field called item_code item_code is a dynamic field of LOV pop up and a request for this LOV is like that;

    Select nom_element d, r from item_master by item_code item_code;

    When I create the new record in the form B and LOV allows to find and get the item code, LOV works very well
    and he returns the key value in the field of item_code.
    But when I try to update the record (I have a link to the page of the form B), item_code field value is not the key-value of LOV, but is a
    Display value of LOV.

    Any ideas?

    Thank you.

    Hello:

    If you want to display the key value, and then create a new field that can be a test field or a tabled text (display only) and assign the value of the column of the reporrt link or just the column as it appeas in the database.

    If you use the form at the same time create and view, you might want to do this new field, but also your LOV field as conditional.

    Bruce

  • Update to Microsoft Net framework 3 service pack 2 can I keep the 'old' or do I have to uninstall the

    • I have Windows XP Home Edition and I update through the Download Center.  I don't know whether to keep old service pack or not when the new ones are installed.

    * original title - when updated to service pack 2 for Microsoft Net framework 3 can I keep the 'old' or should I uninstall them. I have Windows XP Home edition. Thank you *.

    If you refer the download files, keep the incase you ever need to reinstall .NET that some of them may be prerequisets for future updates or service packs.

    JS
    http://www.PAGESTART.com

    Never be afraid to ask. This forum has some of the best people in the world to help.

  • Webshots smile updater tries to open when I start my computer, how can I get rid of the updater, but keep the old webshots?

    I like webshots but hate the new smile of webshots.  It's a vile replacement which resulted when webshots was sold and then bought by a new company.  I want to keep my old webshots Photo Manager, so I can't remove webshots.  However, I want to stop the updater smile pop up every time my computer starts. Just to let you know, smile will fly, EACH photograph and film of the file on your computer if it can, then delete the webshots program if uninstall you it now.  This happened to a webshots Member who left on her computer too long.  It is the hearsay of bad intentions by the people to smile, but I don't want any chance of them access to my machine left in place.  Any help you can give on the withdrawal of this issue of update of the file will be more appreciated.

    I like webshots but hate the new smile of webshots.  It's a vile replacement which resulted when webshots was sold and then bought by a new company.  I want to keep my old webshots Photo Manager, so I can't remove webshots.  However, I want to stop the updater smile pop up every time my computer starts. Just to let you know, smile will fly, EACH photograph and film of the file on your computer if it can, then delete the webshots program if uninstall you it now.  This happened to a webshots Member who left on her computer too long.  It is the hearsay of bad intentions by the people to smile, but I don't want any chance of them access to my machine left in place.  Any help you can give on the withdrawal of this issue of update of the file will be more appreciated.

    If you still have your photos on the old Webshots and they are not in Jpeg format, you can download and use a program called ultimate Webshsots converter and then they will be visible even without the old Webshots Photo Manager. Then you can just keep them in your Windows Photo Gallery, which has a pretty decent screensaver. They have more tags or titles on them, but when I went into My Documents, "more...". ", clicked on research and has recently changed then scroll far all JPEG images, are seen as icons, all titles were there. It also eliminates the problem with copyright of Webshots being on each photo, even your own, which is how they are displayed in the smile. I hate the new site also and was horrified when my old Webshots has simply disappeared without warning last week. The more people who know how to transfer their photos with this little program UWC, more hopefully will recover their photos and quickly uninstall the new smile of their computers, never to return. Good luck!

  • APEX_ITEM. The updated TEXT javascript screen refresh shows old values

    I have a multi interactive report record where one of the columns (ITEM_SEQUENCE) is an APEX_ITEM. TEXT field.

    I have an onChange event of javascript on this area that calls a PL/SQL application process on which calls an API to update the sequence of the ELEMENT in the comic book. It works very well.

    However when I update the screen changing the order of the records in the report as theres an order by the ITEM_SEQUENCE - the value displayed on the screen for ITEM_SEQUENCE is not the DB value (even if View Source on the Page, I can see value = db_value). It displays the value entered for this record before the update. Is there a G_F01 (i) value that is maintained for the session which overrides the db value and must clear out when refreshing the Page? If so what is the best way to achieve this.

    Thanks for your help...

    Hi Matt,

    It is possible that the f01 values are not cleared that the page is not filed.

    How are you "refreshing" your report? It might be all you need to do is to reload the page rather than trigger a partial update.

    Andy

  • < af:valueChangeListener > sets the new value back to the old value

    Hi people,

    I'm trying to implement a search bar with < af:inputText > and < af:selectOneListbox >.

    When the user selects an item in the listbox control, the inputText will be updated. After hitting the "ENTER" key, the search action will be taken.

    The valueChangeListener will be called when the selection of items in the listbox.

    The problem can be described by the following two cases:

    (1) the user types something in the inputText box and hitting 'ENTER' key for a search. The valueChangeListener is called and sets the value of the string user typed.

    (2) the user selects something in the list box, each time changes the selection in the listbox control, the valueChangeListener will be called. But when the user presses the "ENTER" key, the valueChangeListener is still called, and it sets the return value to the old value. For example, the list has 'a ', ' b', 'c '. The user selects 'a', then 'b '. After hitting the "ENTER" key, the value in the inputText is replaced with "a".

    The code is as follows:

    Code in .jspx:

    < af:inputText value = "#{pageFlowScope.word} '"

    autoSubmit = 'true' immediate = "true".

    valueChangeListener = "#{pageFlowScope.update}" / >

    < af:selectOneListbox valuePassThru = "true" >

    < f: selectItems value = "#{pageFlowScope.items}" / >

    < / af:selectOneListbox >

    Bean managed code:

    publicvoid update (ValueChangeEvent event) {}

    This.Word = event.getNewValue (m:System.NET.SocketAddress.ToString ());

    }

    I don't know how the valueChangeListener behaves like that.

    Could someone provide me with clues or tips?

    Thank you

    Carl

    Carl, tell us your version of jdev, please!

    There is something wrong in your implementation. I do not see an inputText field who's value stored in a variable pageflowscope "word". This field has an attached valuechangelistener which is obsolete, because the field already stores its value in the variable pageflowscope. The same that you are trying to do in the valuechangelistener. So I don't see a selectonelistbox which does not store the value selected anywhere because it doesn't have the value property for it. There isn't an attached valuechangelistener so I wonder how your valuechangelistener is called at all when you change the selectoneListBox.

    Timo

  • Compare multiple columns and update a column based on the comparison

    Hi all

    I have to update the column STATUS of the slot structure of the table.

    Status should be 'P' if all the columns count are equal on the other should be "F".

    The value of the column can be "NA'. If the value is NA, then avoid this comparison column; compare only other 3 columns.

    My output should look like below.

    State of cnt1, cnt2 cnt3 ID cnt4

    1   4       4       4     4       P

    2   4       5       4     4       F

    3 4 4 NA 4 P

    NA 4 4 3 4

    I tried with the statemnt with BOX WHEN conditions and DECODE UPDATE, but could not succeed, can someone please help

    To do this, if you use my statement in response #11 box (Re: Re: comparison of multi-column and update a column based on the comparison of)

  • Change the tasks triggered with the old values

    Hi all

    We have a problem where our editing on the definition of process AD sometimes tasks copy old values of the form user IOM, for example "Surname of change", "Change Display Name", etc. Sometimes it works for all fields that are changed on the UserForm IOM and the updated values are copied all over the user AD form, sometimes a mixture of new and old values are copied, and sometimes only the old values are copied. Anyone seen this before? We post the event handlers for the email address and display name causing additional updates on the user IOM form, when the values are changed.

    Thank you

    Albin

    We were already using UserManager instead of the EntityManager. The question must have been that several updates triggered by our event handlers and the user object was so an inconsistent state, sometimes the old name values were transmitted to the AD form and sometimes the new values. We have solved by adding all the electronic trigger code and display name updated in a single event handler instead of two separate. It seems to work now.

    Albin

  • How to compare the new values with the old values in triggers.

    Dear all,

    Please tell me how to compare the new values with the old values in triggers.

    Hi, the employee example is in the document. You'd better read yourself.

    CREATE OR REPLACE TRIGGER Print_salary_changes
      BEFORE DELETE OR INSERT OR UPDATE ON Emp_tab
      FOR EACH ROW
    WHEN (new.Empno > 0)
    DECLARE
        sal_diff number;
    BEGIN
        sal_diff  := :new.sal  - :old.sal;
        dbms_output.put('Old salary: ' || :old.sal);
        dbms_output.put('  New salary: ' || :new.sal);
        dbms_output.put_line('  Difference ' || sal_diff);
    END;
    /
    

Maybe you are looking for