DELETE/INSERT

Hi,
Am working on a Mapping that requires a delte insert functionality. That is, the rows in target matching a specific column should only be deleted.
So, modified loading type to delete/insert, match by constraints to none, and then set match column when deleting to yes for the specific column
The mapping is but doing a blanket delete. Can somebody suggest a workaround or tell where the problem is.
OWB 9.2.0.2
Regards
Jojo

OK. I have partitioned the fact table based on year and changed the loading type to TRUNCATE/INSERT. Under "Conditional Loading" I have set the 'Target Filter for Delete' to INOUTGRP1.YEAR='2004'.
When I execute the mapping to replace data for year 2004, all the data is deleted (including the data for year 2003) and the new 2004 data is inserted. How can I just replace the data for year 2004 and leave the data for year 2003 intact?

Similar Messages

  • Edit/delete/insert forms using php

    Hi,
    I have created an application that will allow me to
    edit/delete/insert data to my database using php.
    The functions work. But when I click on a tab i get an error
    like this:
    ypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at
    StoreManagement/runFeed()[C:\adobeStoreManagement\StoreManagement\src\StoreManagement.mxm l:26]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at
    mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\co re\UIComponent.as:9051]
    at
    mx.containers::ViewStack/dispatchChangeEvent()[E:\dev\3.0.x\frameworks\projects\framework \src\mx\containers\ViewStack.as:1165]
    at
    mx.containers::ViewStack/commitProperties()[E:\dev\3.0.x\frameworks\projects\framework\sr c\mx\containers\ViewStack.as:672]
    at
    mx.containers::TabNavigator/commitProperties()[E:\dev\3.0.x\frameworks\projects\framework \src\mx\containers\TabNavigator.as:504]
    at
    mx.core::UIComponent/validateProperties()[E:\dev\3.0.x\frameworks\projects\framework\src\ mx\core\UIComponent.as:5670]
    at
    mx.managers::LayoutManager/validateProperties()[E:\dev\3.0.x\frameworks\projects\framewor k\src\mx\managers\LayoutManager.as:519]
    at
    mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:669]
    at Function/
    http://adobe.com/AS3/2006/builtin::apply()
    at
    mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\sr c\mx\core\UIComponent.as:8460]
    at
    mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src \mx\core\UIComponent.as:8403]
    Also the first time I click on the edit program link it
    doesnt show any data in the combo. Then when I click on new store.
    It fills up the comboboxes. When I go back to the edit program tab.
    It now also has the data inside the combobox.
    When I add a new program, store or categorie. It says
    operation succesfull. But the new program is not added to the new
    comboboxes. I have to close the browser and rerun the application.
    Then it shows the entered value inside the comboboxes.
    I have attached all my code for this application, any help
    would be greatly appreciated. Also could you advise me on what is
    the best approach to do this?
    With friendly regards,
    Thomas

    A few things:
    * Do not use lastResult in AS code. It is intended for use in
    binding expressions only. I suspect that it is the cause of your
    error, since it will not yet exist where you are trying to
    reference it.
    * All data service calls in Flex are asynchronous. this means
    you can *never* access the result data in the same function you
    call send(), as you are attempting.
    * Use a result handler for all HTTPService calls
    * Your data model methodology is *good*, using instance vars
    to hold ArrayCollections, and binding to those vars. Just set the
    vars in a result handler, instead of in the send function
    * the default resultFormat of HTTPService is object. This
    causes Flex to convert the HTTPService XML into a tree of dynamic
    objects. While it provides a quick start, it has long term
    drawbacks. I advise setting resultFormat="e4x", so that youcan use
    the powerful e4x XML API on your data.

  • Using delete/insert mode operator target in mapping

    Hello Guys,
    Can you help me please to resolve my problem. It's very urgent.
    I use OWB 10gR2 and I create a mapping for loading data from table to table.
    I got a source table A that I want to integrate into a table B.
    I want to put my target table B on delete/insert mode to delete data from B where A.annee = B.annee
    before inserting data from A.
    How to configure this mapping.
    Thanks in advance.
    Regards.
    fanfita.

    you dont have to do anything in particular:
    on the target table propperties click on the load type as Delete/Insert and specify the column which you need to check while deleting this can be done by clicking on the column of target table in your mapping and setting the properties such as "load while insert/delete/update etc" , you got to check the delete option of the columns that you want to check while deleting.
    If your target table has sequence then delete and insert will generate new sequence id and i am not sure if there is a Foregin key which needs to be considered here so it might be a better option to use update/insert
    if there are no dependencies at all then you can go for delete/insert option.
    Edited by: Darthvader-647181 on Feb 5, 2009 1:46 AM

  • SP in delete/insert/modify trigger

    I have created a trigger which sends a notification email on deletes.inserts, or updates on a particular table.  Trigger works great.  While testing, I did a delete all - and sure enough the trigger fired on every row that was deleted and I got over 6k emails, LOL!!!  So I am thinking have this trigger call a stored proc, which then keeps up with an audit table with sysdatetime/row/count or something.  If number of rows deletetd within a certain timeframe (10seconds?) exceeds 5 then don't send any more emails.  Does this sound feasible or is there a better way?  Thanks!

    I have created a trigger which sends a notification email on deletes.inserts, or updates on a particular table.  Trigger works great
    Then you must want emails to be sent even if those DML operations fail or get rolled back. Is that true?
    If a user does the following do you really want email notifications sent?
    INSERT INTO myTable . . .;
    ROLLBACK;
    Triggers are non-transactional. They do NOT know if the work they do will ever be committed or not. Any work that a trigger does could be rolled back by Oracle or by the user.
    Unless you want email notifications sent even if that DML 'never happens', because it gets rolled back, triggers are the wrong method to use.

  • Delete inserted record

    I bulid trigger in tabel and check condition, if for example check_statment = X i need to delete inserted record (that mead not insert record) and when check_statment = Y then insert record in table, i try to write delete statment and rollback but there is error appear that the current record are reserved.
    How i can solve it.

    1. Triggers cannot Issues ROLLBACK, SAVEPOINT, COMMIT statements.
    2. I guess you are trying to avoid duplicate records, Create a unique index on the key(col1,col2) which you want to prevent duplicates on.
    3. Or you can Add a column Flag Chr(1) to your table. While inserting you allow the records to get inserted, but based on your condition change the Flag to 'D' - deleted , 'A' -active. Build a View which the user uses for application filtering out the 'D'eleted records.
    Does this look like what you are trying to do !
    Ss

  • Loading Type: DELETE/INSERT

    Hi,
    OWB 9.2.0.x
    I need to develop logic wherein the target rows would be deleted based on a condition (column value already present), and then insert new rows.
    The DELETE/INSERT Loading Type on Target is just doing a blanket delete where criteria matches and inserting fresh rows, instead of deleting just those rows that match the criteria.
    An alternative was to have a lookup, and take that to a splitter, and send matching row to a TARGET with Loading Type set to DELETE, and other set to another copy of the TARGET with Loading Type set to INSERT.
    This also does not work properly, and behaves inconsistently.
    Any help on this would be much appreciated.
    Regards
    Jojo

    To put in an example:
    We have to delete the records matching the input(staging), and then reinsert them.
    That is input records will be like
    1 a
    1 c
    5 a
    5 b
    3 a
    Target may have something like
    1 a
    1 b
    1 c
    2 a
    2 b
    3 a
    All records with first field as 1, 2 or 3 in staging should be deleted from target, and then the full staging gets inserted.
    Final target would then become
    1 a
    1 c
    2 a
    2 b
    5 a
    5 b
    3 a
    An alternate solution that comes to mind is
    Implement a delete mapping, and then do the inserts. But this would require two passes through the staging data.
    Regards
    Jojo Thomas

  • DELETE / INSERT ON A MAPPING

    Hi.
    I am doing a DELETE / INSERT on a mapping, but when I deploy it, the delete condition that generates is not the same that exists in the mapping
    i.e
    MAPPING CONDITION
    INOUTGRP1.TIME_ID
    BETWEEN
    (select TO_CHAR(FECHA_CARGA,'J') || '00' from CDW_PARAM_DWH)
    AND
    (SELECT TO_CHAR(FECHA_CARGA,'J') || '24' from cdw_param_dwh)
    * I delimited the delete range trough START DATE and END DATE
    GENERATED CONDITION
    DELETE FROM "CDW_BALANCE_A_AGG"';
    * The code generated DELETES all the table.
    What can I do?
    Thanks

    Best thing to do is delete before running the mapping in a premapping process. If you need parameters you can still use that by doing it via mapping parameters.
    In the pre mapping process you simply run a function that does the delete within the pl/sql.
    Jean-Pierre

  • Update order document through DI API generates delete / insert ?

    Hi,
    I am developing with B1 88 PL10 and I am doing an update of userfields with DI API.
    Looking on sql server profiling tool I found that  the DI API generates delete / insert instead of update statements ?
    Has someone an explanation ?
    Regards,
    Gregory

    Hi Gregory,
    There are couple of possible reasons for this. I think the most probable one is for performance and accuracy.
    Delete / insert may actually take less time than Update alone.
    Thanks,
    Gordon

  • Delete/Insert in OWB 10g

    hai,
    I wanted to use delete/insert option so that i can selectively delete data and insert
    the new set of records.But what i found is that all the existing records get deleted
    ie selective delete is not happening. Can anyone pls let me know how this can be achieved with the help of delete/insert option(in operator properties of table)
    Thanks And Regards,
    Ashir

    There is a specific Warehouse Builder forum here:
    Warehouse Builder
    You can also post questions to this forum as this forum covers all BI products. To answer your question, I am not sure what you are trying to do. Are you trying to delete the object via "Control Center"? It should be possible to deploy the job as a delete job to remove the directory from your target/source database.
    Keith Laker
    Data Warehouse Solution Architect
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • Xplorer X7-7700 Ctrl + FN , \ + Alt , Delete + Insert keys | SPLIT V2

    Hi SVET,
    I just purchased an MSI-1727 Barebone from a third party vendor (http://www.cyberpowerpc.com/system/Xplorer_X7_7700_Notebook/).  I did some searching and found this post and another post for the A6000 about swapping the Ctrl + FN , \ + Alt , Delete + Insert keys (to look exactly how I typed it); and that is exactly what I was looking to do.  Would it be possible if you could send me a bios that does this?  I have read the posts about how to do it, and I would definitely be willing to make a donation.
    Mainboard:  MS-1727
    PCB Version:  REV:1.0
    BIOS Version: E1727IG6.106
    BIOS Date:  2/1/2010
    EC-FW Version: 
    Thank You

    Quote from: gags1 on 16-June-10, 10:19:58
    Hi SVET,
    I just purchased an MSI-1727 Barebone from a third party vendor (http://www.cyberpowerpc.com/system/Xplorer_X7_7700_Notebook/).  I did some searching and found this post and another post for the A6000 about swapping the Ctrl + FN , \ + Alt , Delete + Insert keys (to look exactly how I typed it); and that is exactly what I was looking to do.  Would it be possible if you could send me a bios that does this?  I have read the posts about how to do it, and I would definitely be willing to make a donation.
    Mainboard:  MS-1727
    PCB Version:  REV:1.0
    BIOS Version: E1727IG6.106
    BIOS Date:  2/1/2010
    EC-FW Version: 
    Thank You
    Hello,
    The requests can be proceed on donation https://forum-en.msi.com/index.php?topic=134259.0
    Once done, the request will be e-mailed to you [up to 24 hours max]
    Best Wishes,
    Svet

  • What is difference of truncate/insert and delete/insert ?

    hi all:
    what is difference of truncate/insert and delete/insert ?

    Hi,
    Truncate will truncate the table, which means there is a DDL operation to empty the table. DDL operations cannot be rolled back, but truncate is much faster than delete (because of that reason). If you do not require recovery of the deleted records in case of a failure, then truncate/insert is more optimal than delete/insert. Notice that for truncate to work, you cannot have enabled foreign keys pointing to the table. Truncate will never perform cascaded deletes.
    Hope this explains.
    Mark.

  • How can i display recent update/delete/insert records in form

    Hai !!!!
    i am new for forms,.......any body tell me, how can i display recent no of records updated or no of records deleted or no of records are inserted in a form. these records count are display in display items....give me detail explination......
    Subbu.....

    the easiest way is copy and paste the oracle-forms example from the OU.
    You need form-level-trigger ON-ERROR + ON-MESSAGE, POST-INSERT, POST-UPDATE, POST-DELETE, three global variables and a procedure:
    ON-ERROR
    handle_message( error_code, 'ERROR: ' || ERROR_TYPE || '-' || TO_CHAR(ERROR_CODE) ||': '|| ERROR_TEXT );
    ON-MESSAGE
    handle_message( message_code, MESSAGE_TYPE || '-' || TO_CHAR(MESSAGE_CODE) || ': ' || MESSAGE_TEXT );
    PROCEDURE handle_message( message_number IN NUMBER, message_line IN VARCHAR2 ) IS
    BEGIN
        IF message_number IN ( 40400, 40406, 40407 )
        THEN
          DEFAULT_VALUE( '0', 'GLOBAL.insert' );
          DEFAULT_VALUE( '0', 'GLOBAL.update' );
          DEFAULT_VALUE( '0', 'GLOBAL.delete' );
          MESSAGE('Save Ok: ' ||
            :GLOBAL.insert || ' records inserted, ' ||
           :GLOBAL.update || ' records updated, ' ||
           :GLOBAL.delete || ' records deleted !!!' );
          ERASE('GLOBAL.insert'); 
          ERASE('GLOBAL.update');
          ERASE('GLOBAL.delete');
        ELSE
             MESSAGE(message_line );
              END IF;
    END;
    POST-INSERT
    DEFAULT_VALUE('0', 'GLOBAL.insert');
    :GLOBAL.insert := TO_CHAR( TO_NUMBER( :GLOBAL.insert ) + 1 );
    POST-UPDATE
    DEFAULT_VALUE('0', 'GLOBAL.update');
    :GLOBAL.update := TO_CHAR( TO_NUMBER( :GLOBAL.update ) + 1 );
    POST-DELETE
    DEFAULT_VALUE('0', 'GLOBAL.delete');
    :GLOBAL.delete := TO_CHAR( TO_NUMBER( :GLOBAL.delete ) + 1 );try it
    Gerd

  • How to Display Number of Rows Deleted/Inserted etc... in PL/SQL

    In Oracle 10g PL/SQL, I have a delete statement in a stored procedure. It is not in a cursor. I want to see the number of rows I've deleted. I can use the dbms_output.put_line package. I should know this, but I don't have time to perfect the syntax. How would I get the number of rows that get deleted and display it via dbms_output.put_lline?

    No time to google either I guess.
    http://www.google.co.uk/search?q=number+of+rows+deleted+oracle&rls=com.microsoft:en-gb&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1&rlz=&redir_esc=&ei=Qi5qToGyGYqw8QOGzf3nAg
    SQL> create table dt_del_ex(id number);
    Table created.
    SQL> set serveroutput on
    SQL> BEGIN
      2
      3      INSERT INTO dt_del_ex VALUES(1);
      4
      5      DBMS_OUTPUT.put_line(TO_CHAR(SQL%ROWCOUNT)||' rows inserted');
      6
      7      INSERT INTO dt_del_ex select rownum from dual connect by level <=10;
      8
      9      DBMS_OUTPUT.put_line(TO_CHAR(SQL%ROWCOUNT)||' rows inserted');
    10
    11      UPDATE dt_del_ex SET id = id + 3 WHERE id >= 9;
    12
    13      DBMS_OUTPUT.put_line(TO_CHAR(SQL%ROWCOUNT)||' rows updated');
    14
    15      DELETE FROM dt_del_ex WHERE id <= 10;
    16
    17      DBMS_OUTPUT.put_line(TO_CHAR(SQL%ROWCOUNT)||' rows deleted');
    18
    19  END;
    20  /
    1 rows inserted
    10 rows inserted
    2 rows updated
    9 rows deleted
    PL/SQL procedure successfully completed.

  • Number of Rows Updated/Deleted/Inserted

    Hi
    To audit what rows inserted , deleted and updated in a particular table i am using the below code . However is there a way i can just get the count of rows inserted , updated and deleted based on date or user . Also please tell me how can i get the terminal and machine name of the USER.
    PACKAGE:
    CREATE OR REPLACE package audit_pkg
    as
    procedure check_val( l_tname in varchar2,
    l_cname in varchar2,
    l_new in varchar2,
    l_old in varchar2 , action in varchar2);
    procedure check_val( l_tname in varchar2,
    l_cname in varchar2,
    l_new in date,
    l_old in date , action in varchar2);
    procedure check_val( l_tname in varchar2,
    l_cname in varchar2,
    l_new in number,
    l_old in number , action in varchar2 );
    end;
    PACKAGE BODY
    CREATE OR REPLACE package audit_pkg
    as
    procedure check_val( l_tname in varchar2,
    l_cname in varchar2,
    l_new in varchar2,
    l_old in varchar2 , action in varchar2);
    procedure check_val( l_tname in varchar2,
    l_cname in varchar2,
    l_new in date,
    l_old in date , action in varchar2);
    procedure check_val( l_tname in varchar2,
    l_cname in varchar2,
    l_new in number,
    l_old in number , action in varchar2 );
    end;
    TRIGGER :
    /* Formatted on 2010/03/21 01:04 (Formatter Plus v4.8.8) */
    CREATE OR REPLACE TRIGGER trigger_emp_up
    AFTER UPDATE
    ON emp
    FOR EACH ROW
    BEGIN
    audit_pkg.check_val ('EMP', 'EMPNO', :NEW.empno, :OLD.empno, 'UPDATE' );
    audit_pkg.check_val ('EMP', 'ENAME', :NEW.ename, :OLD.ename, 'UPDATE');
    audit_pkg.check_val ('EMP', 'JOB', :NEW.job, :OLD.job, 'UPDATE');
    audit_pkg.check_val ('EMP', 'MGR', :NEW.mgr, :OLD.mgr, 'UPDATE');
    audit_pkg.check_val ('EMP', 'HIREDATE', :NEW.hiredate, :OLD.hiredate, 'UPDATE');
    audit_pkg.check_val ('EMP', 'SAL', :NEW.sal, :OLD.sal, 'UPDATE');
    audit_pkg.check_val ('EMP', 'COMM', :NEW.comm, :OLD.comm, 'UPDATE');
    audit_pkg.check_val ('EMP', 'DEPTNO', :NEW.deptno, :OLD.deptno, 'UPDATE');
    END;
    /* Formatted on 2010/03/21 01:04 (Formatter Plus v4.8.8) */
    CREATE OR REPLACE TRIGGER trigger_emp_in
    AFTER INSERT
    ON EMP
    FOR EACH ROW
    BEGIN
    audit_pkg.check_val ('EMP', 'EMPNO', :NEW.empno, :OLD.empno, 'INSERT');
    audit_pkg.check_val ('EMP', 'ENAME', :NEW.ename, :OLD.ename, 'INSERT');
    audit_pkg.check_val ('EMP', 'JOB', :NEW.job, :OLD.job, 'INSERT');
    audit_pkg.check_val ('EMP', 'MGR', :NEW.mgr, :OLD.mgr, 'INSERT');
    audit_pkg.check_val ('EMP', 'HIREDATE', :NEW.hiredate, :OLD.hiredate, 'INSERT');
    audit_pkg.check_val ('EMP', 'SAL', :NEW.sal, :OLD.sal, 'INSERT');
    audit_pkg.check_val ('EMP', 'COMM', :NEW.comm, :OLD.comm, 'INSERT');
    audit_pkg.check_val ('EMP', 'DEPTNO', :NEW.deptno, :OLD.deptno, 'INSERT');
    END;
    /* Formatted on 2010/03/21 01:03 (Formatter Plus v4.8.8) */
    CREATE OR REPLACE TRIGGER trigger_emp_de
    AFTER DELETE
    ON EMP
    FOR EACH ROW
    BEGIN
    audit_pkg.check_val ('EMP', 'EMPNO', :NEW.empno, :OLD.empno, 'DELETE');
    --audit_pkg.check_val ('EMP', 'ENAME', :NEW.ename, :OLD.ename);
    --audit_pkg.check_val ('EMP', 'JOB', :NEW.job, :OLD.job);
    --audit_pkg.check_val ('EMP', 'MGR', :NEW.mgr, :OLD.mgr);
    --audit_pkg.check_val ('EMP', 'HIREDATE', :NEW.hiredate, :OLD.hiredate);
    --audit_pkg.check_val ('EMP', 'SAL', :NEW.sal, :OLD.sal);
    --audit_pkg.check_val ('EMP', 'COMM', :NEW.comm, :OLD.comm);
    --audit_pkg.check_val ('EMP', 'DEPTNO', :NEW.deptno, :OLD.deptno);
    END;
    Thanks

    Hi
    I'm not sure but i don't see that you are "auditing" time of the change and user to. You should expand your audit table ( and package )
    with time and user atribut .
    User , terminal , machine and much other things you can retrieve with sys_context function. For time you can use systimestamp function for example ..
    http://www.psoug.org/reference/sys_context.html ( quite good reference )
    For auditing things like machine you should be careful , if you are accesing your app through some http server you wil get the machine on which the server runs
    and not the "client machine" from which the client has access the application throug that server .
    T

  • Unique constraint error on delete/insert

    Hi,
    I am using Jdeveloper 11.1.1.3.0. I have a ADF table where we can copy lines and delete lines. I get unique constraint error when I save. Looks like the insert operation in happening before the delete operation. Is there a way to set the execution order so that the logical behaviour is delete/update/insert.
    Thanks
    SV

    Hi,
    The unquie contraint is not from the primary key. There are three columns in the table (batch_id, line_number, line_type) which must be unique. In the UI, the user can delete lines, update lines and add lines and finally click the save button that does the commit. On delete the line_number gets re-numbered. So when committing, the unique error occurs because the line number already exists. Looks like insert is happening before update/delete. I cannot do commit after each delete/update/insert. I have to do it only if the user clicks the save button in the end. Is there a way to control the order of execution?
    SR

Maybe you are looking for

  • Error 1003 when building exe

    Hi all, I saw a couple of thread of other people here having the same "1003 error" when trying to build an exe with LV 7.1.1 The exact text error is : Error 1003 occurred at Open VI Reference in Dist Copy Non-VI Files.vi->Dist Build LLB Image.vi->Dis

  • How do I fix the album art on my iPod? It has been scrabbled due to the iOS update.

    My iPod touch 5th generation has had two problems come up since the iOS update; I regret updating because I was happy with how it was before. The album art has been scrabbled on my iPod; it has placed album art that goes with other songs to the wrong

  • Buffer Overrun in Quicktime 7.1.3

    I'll start with the basics: System Config: -Windows XP Pro SP2 (all updates performed) -Intel p4 1.7GHz -1GB RAM -2x120GB 7200RMP UltraQuiet HDDs -Nvidia GeForce 6200 128MB AGP (latest Forceware Release) -SoundBlaster Audigy 2 (latest driver/firmware

  • MM SUS Vendor Replication Error: Error in ALE Service

    Dear Experts, We are implementing MM SUS (SRM 5.0). As a part of this we need to replicate vendors from ECC to SUS system via XI. We have created a Reduced Message Type Z_CREMAS_SUSMM and had set up the partner profile in WE20 with SUS logical system

  • Batch Exporting File Naming Issue

    I have to batch export about 30 images at a time, but I am having an issue now that the "Export" piece of the action includes a specific file name in the "save in" property, where as it's supposed to only include the name of the containing folder. Th