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

Similar Messages

  • Updating a column using deleted/inserted during update statement execution

    I need to capture the old value while update statement is executed. I can not insert into temp table (there are many samples online where you can use OUTPUT clause to insert data in same table or another temp table)
    something like 
     declare @count table
        id int,
        changed varchar (50)
    insert into @count (id,changed) values (2,'T')
    insert into @count (id,changed) values (3,'T')
    insert into @count (id,changed) values (4,'T')
    select * from @count
    UPDATE @count
    SET id=5,
        Changed = GETDATE() -- here instead of date, I want to get inserted.id and  deleted.id
    OUTPUT inserted.id,
           deleted.id
        where id = 2
      SELECT *FROM @count
    Any help on this will be very much appreciated....

    I am not sure to follow your question but you can get the old value just by doing:
    UPDATE @count
    SET id=5,
        Changed =  id
    OUTPUT inserted.id,
        deleted.id
    WHERE id = 2;
    since SQL Server uses all-at-once operations.
    Microsoft SQL Server 2012 T-SQL Fundamentals
    http://shop.oreilly.com/product/0790145321978.do
    AMB
    Some guidelines for posting questions...

  • Update/Insert mode couldn't apply to SQL Server source via Transparent Gateway.

    Hi all,
    OWB version is 9.0.2.56,database version is 9i Release 2.
    When set load type to "Insert",mapping works fine from SQL Server to Oracle table,via Transparent Gateway 901.
    But "Update/Insert" always runs error with "Fatal error or maximum number of errors exceeded".while I define both source and destination table to oracle tables in mapping,"Update/Insert" works file.
    Any suggestion?

    Hi Ignor,
    Thanks for your reply!
    The SQL Server version is SQL Server 2000.
    I just want to ETL data from a SQL Server table via Transparent gateway into oracle table,the source table has a increment seq field,so I want to define mapping using update/insert loading method in OWB,according to this seq field,if there is the same seq in the target table,do update,if not,insert the row.I just find out that if I use a middle table in oracle to do truncate/insert mode from SQL Server source table,then do update/insert mode from the middle one to target table,it works.But can't do directly from source to target using update/insert mode.Does this means update/insert mode only apply to mapping from local table to local table?
    Regards,
    Robbin

  • 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/

  • How to delete some date in target table at a mapping?

    How to delete some date in target table at a mapping?
    I extract date from source tabel into target table,
    but before extract date I want to delete some date from target?
    how to do?

    Just to change a bit of terminology in the reply, within the mapping, click on operator properties and choose TRUNCATE/INSERT.
    Note that truncate is dependent on constraints, so you probably must disable those before doing this. You can of course do DELETE/INSERT...
    Jean-Pierre

  • Transformations not occuring properly using PIVOT operator in OWB mapping.

    Hi ,
    In our project we have a OWB Map UII_D_MAP_SPC_CUST_FAULT_NATTR which is used to populate UII_CUSTOMER_FAULT table in our target side.
    The source table which populate UII_CUSTOMER_FAULT is SR_S_TABLE_N_ATTRIBUTEVALUE (a materialized view in another External Db)
    This Mview has 2 columns: S_N_STRINGVALUE & N_NAME.
    When N_NAME is 'FAULT_REPORT_CODE' the corresponding S_N_STRINGVALUE value should populate the REPORT_CODE field in UII_CUSTOMER_FAULTin the target sde.
    This source to target transformations is being done by using UNPIVOT operator in this mapping UII_MAP_SPC_CUST_FAULT_NATTR.
    In ideal case when S_N_STRINGVALUE is NOT NULL, REPORT_CODE value should be populated with the value of source field value (ie the value of S_N_STRINGVALUE) and when S_N_STRINGVALUE is NULL , REPORT_CODE should be populated with 'XX'.
    But in some cases REPORT_CODE value in UII_CUSTOMER_FAULT table is populated as NULL when S_N_STRINGVALUE is NOT NULL
    which should not happen.
    We suspect that there is some prpblem in the UNPIVOT operator, but we are not able to track down the exact location where it is failing. Can you please help in resolving this problem?
    Shall we remove Unpivot operator and use CASE statement in some package that will be called through Expression operator?
    Please advise.
    Regards
    Arinjit Dhar

    Arinjit,
    Have got any solution forthis. Today I ran into exactly the same problem. If you have got the solution, can you please post it in the forum.
    Ott Karesz,
    I have posted my SQL which got generated. The problem is when I am running the SQL just for the particular data set, it is giving the output properly. But what confuses me more is, when I run the mapping just for few records, it is populating the values correctly, but when running the mapping for all the records, then it populates null values for those records.
    Generated SQL:
    INSERT
    INTO
    "TB_PIPE_1"
    ("ASSETNUM",
    "SITEID",
    "TYPE",
    "STATUS",
    "YEARLAID",
    "MATERIALCODE",
    "PRESSURECODE",
    "DIAMETER",
    "METHODLAID",
    "JOINTTYPE",
    "SDRCOL",
    "LENGTHLAID",
    "LENGTHDIGITISED",
    "MEASUREUNITID")
    SELECT
    "UNPIVOT"."ASSETNUM" "ASSETNUM$1",
    "UNPIVOT"."SITEID" "SITEID$1",
    "UNPIVOT"."CLASSIFICATIONID" "CLASSIFICATIONID$1",
    "UNPIVOT"."STATUS" "STATUS$1",
    "UNPIVOT"."YEAR_LAID" "YEAR_LAID$1",
    "UNPIVOT"."MATERIAL" "MATERIAL$1",
    "UNPIVOT"."PRESSURE" "PRESSURE$1",
    "UNPIVOT"."DIAMETER" "DIAMETER$1",
    "UNPIVOT"."METHODLAID" "METHODLAID$1",
    "UNPIVOT"."JOINTTYPE" "JOINTTYPE$1",
    "UNPIVOT"."SDR" "SDR$1",
    "UNPIVOT"."LENGTHLAID" "LENGTHLAID$1",
    "UNPIVOT"."LENGTHDIGITESED" "LENGTHDIGITESED$1",
    "UNPIVOT"."MESUREUNIT" "MESUREUNIT$1"
    FROM (SELECT
    "ASSETNUM" "ASSETNUM",
    "SITEID" "SITEID",
    "STATUS" "STATUS",
    "YEAR_LAID" "YEAR_LAID",
    "CLASSIFICATIONID" "CLASSIFICATIONID",
    MIN(CASE WHEN "ASSETATTRID" = 'MATERIAL' THEN "ALNVALUE" ELSE NULL END) "MATERIAL",
    MIN(CASE WHEN "ASSETATTRID" = 'PRESSUREREGIME' THEN "ALNVALUE" ELSE NULL END) "PRESSURE",
    MIN(CASE WHEN "ASSETATTRID" = 'DIAMETER' THEN "NUMVALUE" ELSE NULL END) "DIAMETER",
    MIN(CASE WHEN "ASSETATTRID" = 'METHODLAID' THEN "ALNVALUE" ELSE NULL END) "METHODLAID",
    MIN(CASE WHEN "ASSETATTRID" = 'JOINTTYPE' THEN "ALNVALUE" ELSE NULL END) "JOINTTYPE",
    MIN(CASE WHEN "ASSETATTRID" = 'SDR' THEN "ALNVALUE" ELSE NULL END) "SDR",
    MIN(CASE WHEN "ASSETATTRID" = 'LENGTHLAID' THEN "NUMVALUE" ELSE NULL END) "LENGTHLAID",
    MIN(CASE WHEN "ASSETATTRID" = 'LENGTHDIGITISED' THEN "NUMVALUE" ELSE NULL END) "LENGTHDIGITESED",
    MIN(CASE WHEN "ASSETATTRID" = 'DIAMETER' THEN "MEASUREUNITID" ELSE NULL END) "MESUREUNIT"
    FROM (SELECT
    "MV_PIPE"."ASSETNUM" "ASSETNUM",
    "MV_PIPE"."SITEID" "SITEID",
    "MV_PIPE"."STATUS" "STATUS",
    "MV_PIPE"."YEAR_LAID" "YEAR_LAID",
    "MV_PIPE_SPEC"."ASSETATTRID" "ASSETATTRID",
    "MV_PIPE_SPEC"."NUMVALUE" "NUMVALUE",
    "MV_PIPE_SPEC"."ALNVALUE" "ALNVALUE",
    "MV_PIPE_SPEC"."MEASUREUNITID" "MEASUREUNITID",
    "MV_PIPE"."CLASSIFICATIONID" "CLASSIFICATIONID"
    FROM "MV_PIPE_SYN" "MV_PIPE",
    "MV_PIPE_SPEC_SYN" "MV_PIPE_SPEC" WHERE "MV_PIPE"."ASSETNUM" in ('466651706','606703143') and ( "MV_PIPE"."ASSETNUM" = "MV_PIPE_SPEC"."ASSETNUM" )) "OUTGRP1"
    GROUP BY
    "ASSETNUM", "SITEID", "STATUS", "YEAR_LAID", "CLASSIFICATIONID") "UNPIVOT"

  • 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.

  • 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

  • Keyboard - Turning off Insert mode that deletes added text

    Hi, I have an iMac 2.80Ghz dual, 4 GB RAM, Leopard 10.5.2.
    Problem is most assuredly because I’m a Windows to Mac convert.
    Keyboard (USB aluminum thin plug-in keyboard) is in mode where all characters are deleted in front of the cursor - equal to Windows “insert” key being activated.
    Checked the keyboard chart for new Mac users.
    Fn and Enter do not make any difference.
    Have done this in and outside of num lock being on.
    This is really driving me nuts. I do a LOT of typing and when I need to edit something, it’s killing me that everything gets deleted instead of just adding text!
    What am I doing wrong? How can I turn off the “insert” mode that is deleting everything instead of adding text where my cursor is pointed?
    I’m sure it’s something like there’s a screw loose between my Mac and my chair.
    Thanks for help in pointing me in the right direction.

    It’s not all software - I discovered this later in the day yesterday.
    I had been working in Sun’s Open Office inside of Fusion. Have to work in Fusion with Open Office because use a transcription/time coding software that is Windows-based and haven’t found one that is comparable for Mac other than InqScribe and I don’t much care for InqScribe.
    Once I shut down Open Office and reopened it, the insert problem had finally resolved itself.

  • How to insert blank page into pages document when using word processing mode?

    I've recently created a 50+ page document using Pages '09. I started the document using word processing mode. Now, when I view in thumbnail mode and try to insert a blank page somehwere in the middle of the document, it won't allow me to select where I want. It just selects all the pages, as thought they are one section. I believe this is because I am in word processing mode. My question is, can I convert the document to layout mode so that each page represents it's own section, without losing what work I've already done? And if so, how?
    The document is entirely text boxes and images, so I don't have any need for word processing space. I just need new pages to act as blank templates for the text boxes and images I create.
    Is it possible to keep all my work as is, and convert the document to layout mode vs. word processing mode?
    Thanks!

    It just selects all the pages, as thought they are one section.
    That's because they are one section. You must insert section breaks to separate them. There is no need to use page layout which does make each page a separate section. You have to manually add each page & use text boxes or other containers for the text & link the text boxes.

  • Using two premap operator in a map.

    Hi,
    Can I use two premap operator in a map in OWB 10g Release 1?
    If no then Is it possible to do in OWB 10g release 2?
    Please reply.
    Thanks in advance.

    From Oracle® Warehouse Builder User's Guide 10g Release 2 (10.2.0.2)
    A mapping can only contain one Pre-Mapping Process operator. Only constants, mapping input parameters, and output from a Pre-Mapping Process can be mapped into a Post-Mapping Process operator
    Thanks,
    Sutirtha

  • If your database in Full Recovery mode, can you use Bulk Insert Task to load data

    If your database in Full Recovery mode, can you use Bulk Insert Task to load data

    If your database in Full Recovery mode, can you use Bulk Insert Task to load data
    Yes you can ofourse but dont be in idea that logging will be mininal. Loggign will be as per recovery model full. Every thing will be logged. If you are going to use bulk insert task you can consider switching recovery model to Bulk logged but you will not
    have option to do point in time recovery.
    PS: please dont create duplicate threads
    If you read first Note section in below link it clearly states that yes logging will be full and you can use
    http://technet.microsoft.com/en-us/library/ms191244(v=sql.105).aspx
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Mapping Networkdrive using GPO and Item-Level Targeting - Same Letter in two groups

    Hi.
    I'm using one GPO to Map networkdrives, we are using it with Item-Level Targeting which targets on Security Group, so a Member of "SecurityGroup" gets the Drive, we have several drives and we are using all the Letters that are available, now I'm
    in a pickle and need help with If a User is part of two Security Groups that uses the same letter to map the drive, Example: User1 is a part of two security groups "Drive-Sales" and "Drive-Account" these two Security Groups uses the same
    Letter in the GPO to map the drive, so if the User is in both Groups he only gets the "Sales Drive" but not "Account Drive".
    So what I need is that can the GPO assign next Available letter on the computer that "user1" is logged on, and can it be signed on the "Account Drive". ?
    Hope you understand what I'm going for
    Kind Regards
    Haflidi Fridthjofsson.

    > we are using all the Letters that are available
    You should eventually switch to DFS Namespaces and Access based
    enumeration - so each user will have the DFS root assigned and can only
    see the subfolders he has access to.
    > So what I need is that can the GPO assign next Available letter on the
    > computer that "user1" is logged on, and can it be signed on the "Account
    > Drive". ?
    Yes: Create another assigment with an ILT of "user is member of BOTH
    groups" and use "next available" in this assignment.
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • 2002 Updation  using MOD -Operation.

    when we try to update the 2002 infotype using HR_INFOTYPE_OPERATION
    it is saving the STDAZ field value as 24
    when I pass any value in STDAZ through my frontend?
    is typing a message.
    : for ex: 1,2,3,4,5,6,7, or 8
    For Updation we are using MOD -Operation.

    Hi,
    STDAZ is automatically calculated from the difference btw BEGUZ and ENDUZ fields.
    If you donot fill these fields bur specify STDAZ instead, the system takes the attendance as 1 day and make STDAZ as 24 hours.
    Pls use BEGUZ and ENDUZ fields instead of directly updating STDAZ.
    Regards,
    Dilek

  • How To: Use ADF Form in "Insert" Mode in jDeveloper 12c

    Hi all,
    I'm in the process of learning jDeveloper and after going through the basics, a task that I'm trying to accomplish is to have a ADF Form load in "Insert" mode rather than the default "Update" behavior. After significant searches, the closest that I could come to was Create-adf-input-form post. But since that tutorial is based on the 11g version, I'm struggling to find an equivalent of that in 12c.
    Can anyone point me in the right directly and help me in determining how I would achieve the same in 12c?
    Thanks,
    Nisar

    Nisar,
    If you want the newRow to be readily available when the page loads, you call vo.createRow() in a AM method and expose that method as a client interface. Call this method on the page load.
    The below links might help to call method on page load:
    Johny's Tips: ADF: How to execute the ViewObject with a ViewCriteria on the PageLoad in ADF Web Application
    https://blogs.oracle.com/aramamoo/entry/an_epic_question_how_to
    This link helps to know how to create VO row programatically.
    http://www.awasthiashish.com/2012/12/insert-new-row-in-adf-viewobject.html
    Let us know if you face any issue while implementing.
    Cheers
    AJ

Maybe you are looking for