Delete the matched, then insert

Hi,
I want to implement a loading situation like this: When there is match, delete all matched records, then insert the new record into the table.
I used delete/insert operator property by specifying one attribute for delete match. But it ended up delete all records in the table and insert the new records, instead of just delete the matched.
Is there loading type or operator property that allows me to handle this in mapping without going through transformation? Thanks
Tracy

Hello Tracy,
As you have noticed there is little difference between DELETE/INSERT and TRUNCATE/INSERT (main difference is that the former allows rollback in case of failure, the latter more efficient).
There is no way to archive what you want in OWB 10R1 in a single mapping (unless cheating and doing everything in PL/SQL!).
You can split your problem into two separate mappings:
1) delete all records from your target that match your source
2) insert your source records into the target
Alternatively, you can
1) delete all records from your target that match your source except one (using eg. ROWID)
2) update your target with source rows
Regards, Hans Henrik

Similar Messages

  • DELETE THE MATCHED RECORDS IN DB2 TABLE

    DELETE THE MATCHED RECORDS IN DB2 TABLE
    sql server table sqlserver_emp(c1,c2,c3,4)
    records:1 2 3 4
    DB2 table db2_emp(c1 key,c2,c3,c4)
    records:1 2 5 6 7 8
    Both tables having same structure
    Matched records : 1 2
    1.Delete the matched records in db2 table : 1 2 (without using truncate option for DB2 in Anywhere)
    2.Finally Load all records in sql server(Because duplicate records in db2 already removed so no duplicates occured)
    3.NEED final OUTPUT AS:db2 table: 5 6 7 8 1 2 3 4
    Note:
    1.DB2 truncate doesn't used
    2.STARING AREA: ORACLE
    3.SQLSERVER AND DB2 CLOSED ENVIRONMENT DOESN'T USED AS STAGING AREA.
    HOW MANY INTERFACES AND PROCEDURES SHOULD BE CREATE? WHAT ARE THEY?
    HOW TO REACH MY REQUIREMNT?
    Answer provider is more appricatable.
    Thanks in advance.
    Edited by: krishna on Nov 9, 2011 8:40 PM

    1st option
    See in this scenario you can use two interface and one procedure step.
    1st interface-->poricedure-->2nd interface
    1st interface will bring data to oracle staging-->then procedure will delete matched record from target using keys--->3rd interface will simple insert the the data in oracle staging.
    2nd option
    Insted of deleting the target matched records, you just update target matched record with latest records in your staging oracle.You can use IKM Merge
    Thanks

  • How do I change a clip from say, side by side to picture in picture without deleting the clip then reinserting it

    I'm creating an iMovie '11 project and added a side by side video clip but now I want to change the side by side to a picture in a picture. The only way I now know is to delete the clip, then replace it and when I do that, the advanced tools window opens and I can pick.  Is there a way to open that window when the clip is already in place?

    I also have this question. Avid lets you change the frame up/down -  to/from a dissolve point. In other words, I could have a dissolve go "up" at, for example, 5 frames, and then "down" at, say, 15 frames. As it stands now, FCPX only allows you the same amount of frames on either side of the cross-dissolve. (A 30-frame dissolve is split 15 frames on either side of the transition.)
    Other NLE's give you the option for a dissolve to occur at the BEGINNING, in the MIDDLE (STANDARD CROSS-DISSOLVE) or at the END of a transition. (Depending, of course, on if you have the "handles" to execute the transition,)
    Can we achieve this in FCPX? Is this where we launch the "precision editor?"

  • TS1702 I had this Scrabble on my iPad2 and began to have connection problems, it would lock in the "connecting" position. This is not the first time Scrabble has had problems with interface. Typically customers delete the Ap then download it again to rein

    I have contacted EA about this and can find no help. I had this Scrabble on my iPad2 and began to have connection problems, it would lock in the "connecting" position. This is not the first time Scrabble has had problems with interface. Typically customers delete the Ap then download it again to reinstall it. During the process you sign in and approve the purchase KNOWING that another window will open saying that you have previously purchased it and that there is no charge. So what happened this time? It will not connect and all of my saved and current games are wiped out. I want my money back, this game interface is pretty junk and operates like some ancient DOS program,,bug,bug,buggy. I want my money back.

    Go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report the issue to the iTunes Store.
    Regards.

  • I want a user to only be able to update/delete the rows they inserted

    hi guys,
    I have a table 2 users are inserting into. They can also update/delete the rows in the table. However, I do not want them to be able to update/delete the others users row. I only want them to have update/delete at the row level.
    how can this be achieved?
    thanks

    Another idea if you really have just two (or a fixed set of N) users.
    Does your table have a generic primary key (PK)?
    You could use two (N) sequences having two (N) distinct sets of numbers as e.g user a is using sequences less than 1000000000, the other one values larger or equal to 1000000000.
    create sequence <user_a>.pk_seq start with 0;
    create sequence <user_b>.pk_seq start with 1000000000;An insert trigger uses <user_a>.pk_seq or <user_b>.pk_seq for generating the PK depending upon the current user for new records.
    An update trigger allows updates only, if the PK of the record to be updated is in the range of sequences belonging to the current user.

  • HT201210 I am trying to update the new ios6 software and I keep getting an error message saying: "iTunes could not backup the iPhone because the iPhone is corrupt or not compatiable with the iPhone.  Delete the backup then try again."

    How do I delete the backup?  Will I loose all my information?

    Disable your firewall/security software.

  • How to delete the matching records from two internal tables

    Hi ,
    I have two internal tables say A and B of the same type. If A has 10 records and B has 4 records , I want to delete the 4 records in B from A .
    loop at B into wa .
    delete A where key = wa - key .
    endloop.
    takes a long time if the table B is huge. how can I improve the performance.
    Thanks.
    Gayathri

    Hi Gayathri,
    You could try field-symbols. It reduces the data transfer from the internal table B to the work area.
    field-symbols <fs_itab_b> like line of B.
    loop at B assigning <fs_itab_b>.
      delete A where key = <fs_itab_b>?-key.
    endloop.
    Regards,
    <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=zwcc%2fwm4ups%3d">anand Mandalika</a>.

  • Why is there a while loading screen on some apps that doesn't load? I have to delete the app then restart?!?

    What's with a White loading screen when I exit and app without closing it? I go back in and it just stays stuck on that same white loading screen with the circle, and does nothing!!!

    How much space do you have left on your iPad ?
    Also with your five fingers,  slide them up on the screen to view multitasking menu and see how many apps are open. Then tap and hold one and close a bunch. This can slow things down and makes apps not work. Your iPad might not have enough RAM for everything.

  • I have an apple iphone 4gs... It is synced with my outlook exchange in the office. If I do a search for emails that also checks the server then all of a sudden I end up with various amounts unread email with the inbox saying "Inbox 71" ..which is not true

    I have an apple iphone 4gs... It is synced with my outlook exchange in the office. If I do a search for emails that also checks the server then all of a sudden I end up with various amounts unread email with the inbox saying "Inbox 71" ..which is not true. The only way to make the inbox on the iphone back to 0 is to delete the account then re install it.
    Anyone have any ideas

    We need to know more about your system, please download EtreCheck and run the report and please post it on your next reply. Then we can see how your system is configured, what apps are on it and look for anything obvious. We will look forward to seeing your report.

  • How to delete the dunning run and dunning notice?

    Hello everyone,
    If I created a dunning run with a future date and this has been printed, then I can not delete this dunning, so I just delete the job. But when I try to create a new dunning for the same customer, the system do not allowed me to dunned again. Is there anyone can help me on this issue?
    thanks in advance and Best regards,
    Maria

    Hi,
    if you have executed a dunning run up to the Dunning selection executed, then you can delete the run from the menu path Dunning notices -> Delete dunning run.  This will not delete the parameters, only the selection run.  customers will be released from dunning block.
    However, if you have executed the print, i.e. your dunning run has the status, dunning notice printed, then you will not be able to delete it using this route.  The customers block is released when the print out is taken.
    If you want to delete the run, then you can try re-organising the run, using the menu path Environment - Reorganisation.  I am not sure whether this will release cusomers, try it on a test system and see.
    Cheers.

  • I have iBooks 2.1 on ipad. I changed my password and can no longer update the app. If I delete the app and install the updated version, will I lose the books I have purchased?

    I have iBooks 2.1 on ipad. I changed my password and can no longer update the app. If I delete the app and install the updated version, will I lose the books I have purchased?

    Try logging out of your account on the iPad by tapping on your id in Settings > iTunes & App Stores and then log back in and see if you can then update the app.
    If you do delete the app then you should be able to re-download your ibook purchases via the Purchased tab in the ibookstore in the app. But in case some of them are no longer available in the store and/or you have PDFs or epubs in it, then you could first connect it to your computer's iTunes and do File > Transfer Purchases (File > Devices > Transfer Purchases on iTunes 11) which should copy them over to the Books part of your iTunes library so that you have your own copy of them and can sync them back (even though they aren't iTunes purchases it should also copy over any PDFs or epubs that you have in the iBooks app)

  • I accidentally deleted the actual folders in my history "library." I need to get them back/make new ones. How can I do this?

    I have searched support but only find answers like "wait a few days and the folders will return." I need all the standard folders back like "today", "yesterday", "last 7 days", etc. Thank you.

    Apologies for jumping in. This will not be a quick fix or even a complete fix, it may not even work; but it may be important you act quickly to get any fix!
    Better still swap the HDD over and use another OS to clone and recover !
    I guess it depends on exactly what you did, and the efforts you are prepared to use to attempt to recover the History.
    Immediately back up your Firefox profile. That at least preserves your rolling bookmarks backups and whatever History you do have. Preferably back it up to another machine.
    Now consider leaving that computer alone and using another machine. You can always load that profile on another machine and use it (or preferably yet another copy of it) and see what it contains. (search for a colon : that covers most History)
    Assuming you did delete the history then with luck and timely action you may get some of it back using an undelete utility. (Followed maybe with a sqlite editor to stitch portions back together) download something like recuva : http://www.piriform.com/recuva
    Recovering a whole profile or a whole history is difficult and probably unlikely, but I seem to recall some have succeed with this in the past.

  • Is  it possible to DELETE the Sub Asset either from BDC/BAPI etc?

    Hi Experts,
    I am guessing, the following idea may work for my problem, but, pls, let me give some info, abt the same.......
    1 - At the sales order creation time, each LINE ITEM creates the SubAsset, say,
    Line_ Item_1 -
    > creates SubAsset_1,
    Line_ Item_2 -
    > creates SubAsset_2, so on
    2 - if some reasons, if the user deletes Line_ Item_1, I need to delete that particlar SubAsset_1,
    so, pls. let me know that,
    1- If the user, deletes the item_1, then I wanna, to delete the created SubAsset_1, so then, I guess, SubAsset_2 shuld be modified as SubAsset_1
    2- Is it works out? makes sense?
    3- If so, Wht is the best method to delete a SubAsset from Asset Master? Is it AS02 BDC or Is there any BAPI or any other?
    thanq.
    Message was edited by:
            Srinivas

    as i did not hear any thing, so, am closing.

  • Hw to delete the saved sales order

    HI
    TO ALL
    i want delete the saved sales order    hw can i delete that   completely  
    if any body is answered  i will give u more reward points
    ADVANCE THANX

    hi,
    It is not advisable to delete order. Best option is to block the order. It can be done as follows.
    VA02 (Change Sales Order) >>> then go to item details Sales A, here u can find the filed <b>Reason for rejection</b>, here u put the exact reason & block.
    If u really want to delete the order, then u can follow the paths given by other frieds.
    Reward if it helps.
    Regards,
    Nabeel

  • Can i delete the files and folders in Libraries Cashe

    Hi,
    I was wondering if someone could tell me if it is safe to delete all the files and folders from the
    Libraries >> Cashe
    I have moved all of the files and folders into a new folder and my iMac still seems to run fine, but I dont want to restart it until I know that it really is safe to delete all these files and folders

    Yes I did mean the Caches sorry I wasn't paying attention to what I was typing and made a pretty major typo. Yes i was trying to dingoes a problem with my videos that I embed in iWeb showing fine in iWeb but now been able to load in Safari. I thought I had this problem fixed but it turned out that I didn't have.
    I thought that if i deleted the Caches then the computer would just rebuild them and that might solve the problem, its pretty much a last resort though as I have already looked at the settings and everything and been on the phone to apple tech support and all the settings are correct they are just not showing. The theory was that maybe a half loaded video had some how managed to prevent a the videos from displaying properly and so I thought that rebuilding the caches would solve this problem.

Maybe you are looking for

  • How can I enable the center mouse click to open and close tabs in Firefox and Chrome?

    I have a MacBook Pro Model A1261 purchased in 2009. On my other mac at work (and my PC) I can center click to open a link in a new tab while in Chrome or FireFox, and also to close a tab by clicking on it in the tabs at the top. I am using an externa

  • Editing base value or excise duty during Posting of Excise invoice

    Hi, System is getting greyed out and not allowing to change the base value or Excise duty values during posting of excise invoice, where as it is allowing during capturing the excise invoice. How to change this? We require facility during posting. Is

  • Video on my site

    I'm an actor and want to edit a demo reel to put on my site. what format should i save it as that would not be too compressed and still look good this is a first for me, creating something for the web. any tips, ideas would be greatly appreciated. ww

  • Columns in ALV Grid

    Hallo, do you know if it is possible to prevent a column to be hidden in an ALV Grid? Thanks,          Mick

  • Apple and Blu Ray

    I'll post this here too since its such a hot topic. Interesting comment today from Jobs regarding Blu Ray and Apple: http://live.gizmodo.com/ "Blu-ray is a bag of hurt. I don't mean from the consumer point of view. It's great to watch movies, but the