Conditional Merge - Survivorship in EDQ

Hi
i'd like to know if it is possubtle to do a "conditional merge" in EDQ so null values do not overwrite existing data.
FOr example:
i have an existing customer record with a date of birth and now I want to merge with additional data set coming in. I set up survivorship rules so that the newest complete record wins however the new record has a null value in date of birth. How do I accept all of the newest data records values except the DOB?
this is typical functionality in most DQ tools but we can not find this documented in EDQ.
Thanks
Darren

Darren,
Are these "survivorship" rules defined in Siebel UCM or is this a standalone EDQ project? If the latter, then you can simply use a "Merge Attributes" processor with the "Select empty strings" options set to "No".
regards,
Nick

Similar Messages

  • Conditional merge based on date

    Need help on a merge statement. I need to merge two dataset. But when the key match , I also need to cpmpared the date before I merege it.
    See code below
    drop table x1;
    drop table y1;
    select * from x1;
    select * from y1;
    create table x1 (id number,name varchar2(10),cdate date,status varchar2(1));
    create table y1 (id number,name varchar2(10),cdate date,status varchar2(1));
    insert into x1 select 1,'A',sysdate - 100,'Y' from dual;
    insert into y1 select 1,'A',sysdate - 50,'N'  from dual ;--should change x1.status to y1.status  and x1.cdate to y1.cdate as y1.cdate > x1.cdate
    insert into x1 select 2,'B',sysdate - 20,'Y' from dual;
    insert into y1 select 2,'B',sysdate - 120,'N' from dual ;--should leave status in x1 alone
    insert into y1 select 3,'c',sysdate - 10,'Y' from dual; --should do an insert on x1
    commit;
    --how do I do a conditional merge (key=id,name)
    -- based on the cdate. If y1.cdate >= x1.cdate then take the y1.status  and y1.cdate
    --desire output
    select * from x1
    1     A     01/01/2012 10:54:35 AM     N
    2     B     1/31/2012 10:54:37 AM     Y
    3     C     1/31/2012 10:54:37 AM     Y

    Hi,
    You can add a WHERE clause to the WHEN MATCHED THEN UPDATE section.
    WHERE   x1.cdate  < y1.cdateThanks for posting the CREATE TABLE and INSERT statements; that's very helpful. It would also be helpful if you posted your MERGE statement, even if it's not working perfectly.

  • What WordStar 3.01 can do in Mail Merge that Pages '09 can't.

    I have a Bento database. I want to print contra dances from it on 3x5 index cards. I can save the database as a Numbers worksheet with all the data I want on it. I SHOULD be able to use the fields from that Numbers file to create a Pages document that merges, using that data, to print on the index cards.
    Meanwhile, Apple apparently thinks that addresses are the only kind of data anybody could ever want to merge in a document. This is a stupid limit. Your programmers are unnecessarily standing between me and a reasonable expectation of what your software ought to do.
    I could do this in WordStar in the mid 1980s on a Commodore 128 running CP/M. I could do it in WordPerfect under DOS. I can do it in Word in Windows, and I HATE Windows.
    Why can't I do it in Pages on my Mac?

    Sarris2 wrote:
    I hacked my way to the answer before reading your good advice. I see three problems here:
    1. As you say, the tutorial materials are vague and fail to explain how the feature works or how to get to the feature.
    Agreed
    2. The "Edit:Merge" menu option is greyed out until you add a Merge Field, so you can't connect to a Numbers data source until AFTER you have chosen your first Merge field, which presumes you are using the address book, so the first field has to be an Address Book field even if the eventual document doesn't have any Address Book fields in it.
    No.
    Have you tried my instructions?
    All you need is a Numbers spreadsheet with the appropriate headers in it. Link to that and then you can merge to those revealed headers.
    3. There is apparently a "magic number" bug in Mail Merge in Pages. Since I couldn't connect to a data source until after inserting the first Address Book field and I was working with bad advice from the tutorial, I inserted 14 fields, creating my own cross-reference table in a separate document to tell me which Address Book Field to map each Numbers file Merge Field to.
    Again, why are you insisting on barking up the wrong tree, and arguing with the koalas that they aren't pandas?
    When I actually got around to mapping the fields, I hit the magic number 13 and instead of seeing Numbers fields to map to, I saw Address Book fields again. I tried deleting the field and creating a new one and got a repeat of the Edit:Merge window now pointing to the Address Book. When I once again pointed it to the Numbers file, all the fields I had mapped changed their names to the actual Numbers fields, and when I went to create the new field, the list of choices were from the Numbers file instead of the Address Book.
    Haven't a clue what this is supposed to mean, and why you are still futzing about in Address Book.
    So, I got what I wanted, though I wasted a lot of time unnecessarily using Address Book fields and remapping them to the Numbers fields, and I'm still hampered by the lack of Conditional Merge Fields. From Bento, I have a field named "Becket" that has either a "0" or a "1". I'd like to type the word "Becket" on the card if it is "1" and not type anything if it is "0". I could do that in Wordstar, etc.
    Why?
    It seems that in Pages, I have to tweak the data itself, wrestling with Numbers to replace all "1"s in that column with "Becket" and replace all the "0"s with empty cells. It's a lot more of a tedious process in Numbers than it would be if I just had a conditional Merge field.
    Can't follow what this has to do with a simple merge which is where you started.
    Peter

  • Can you create nested condition in merge(e.g. insert/update) using owb

    Hi,
    Does OWB9iR2 allow you to build in nested condition in merge. such as
    If no match on col1 and col2 then
    if col3 match then no new sequence insert <---
    else insert new sequence;
    else (there is match on col1 and col2)
    update col3 and sequence.
    I have an incremental load for a lookup table, where insert/update is used. There are two match columns and surrogate key is used. When there is no match, it shall not insert a sequence when there is a match on third column. I can not use the 3rd column in the original match because it shall be updated where there is a match for the two match column.
    I am trying to avoid using transformant for performance impact. Thanks

    HIi I think the misleading thing is that in PL/SQL you can use booleans, which is not possible in SQL. So in a PL/SQL tranformation, this is OK:
    a:= case when not orgid_lkup( INGRP1.ORG_ID )
    then get_supid(..)
    else ...
    but, the following SQL does not work:
    select case when not orgid_lkup( INGRP1.ORG_ID )
    then get_supid(..)
    else ...
    into a
    from dual;
    I ended up using only 0/1 as boolean return values for these reasons;
    so I can have:
    select
    case when orgid_lkup( INGRP1.ORG_ID ) = 0 then ...
    though true booleans are better if you don't have to embed them in SQL.
    Antonio

  • Merge text file with condition

    I have two text files (report1.txt and report2.txt) that I want to merge with conditions:
     - Matching rows that have same "ID" and same "TranVal", will keep only one instance
     - Mismatching rows that have same "ID" both rows from 2 file, but column "TranVal" has different value, then the row from report2.txt will replace row in report1.txt
     - Any "ID" that exists in one textfile but not the other one, will be copied to the final merged file
    report1.txt:
    TranDate,ID,TranVal,Comment
    061211,9840,40,done
    061211,9841,30,done
    061211,9842,28,done
    report2.txt:
    TranDate,ID,TranVal,Comment
    061211,9840,40,done
    061211,9841,89,done
    061211,9843,25,done
    Final result should be:
    merge.txt:
    TranDate,ID,TranVal,Comment
    061211,9840,40,done
    061211,9841,89,done
    061211,9842,28,done
    061211,9843,25,done

    Hi,
    I just checked Import-Csv option. I will be able to manage this problem if i can get it in CSV format and work with objects, BUT the problem is in my real file
    the file-format is different which is not comma-separated, instead have "-" as seperator. To simplify the problem i used comma in my question.
    TranDate,ID,TranVal,Comment
    061211-9840-40-done
    Could
    you suggest me if there is any way to convert "-" separators to CSV?

  • Strange Condition Oracle Merge

    I have an Oracle Merge statement. The condition I am facing is that the statement is updating the table as well as inserting the record that its updated. I have duplicates in the table for this reason. Can someone please advice why this condition occurs? the primary key constraint of the table is disabled.

    The Merge statement is attached below. I am selecting my query from a view thats based on a table. My aim is to generate a summary at a level higher than that of the table. date_key here refers to the weekend date. ITs used instead of a week id.
    My problem is that the table has duplicate records after the merge. when i run the select part of this merge, it doesnt get me any duplicates.
    MERGE INTO WEEKLY_PGROUP_SUMMARY w
    USING (
    SELECT date_key, ccid, year_id, period_id, week_id, company, country,
    location, brand, mainbrand, pgroup,
    sales_qty, sales_cost, sales_value,
    fp_sales_qty, fp_sales_cost, fp_sales_value,
    md_sales_qty, md_sales_cost, md_sales_value,
    sreturns_qty, sreturns_cost, sreturns_value,
    grn_qty, grn_cost, grn_value,
    tfrin_qty, tfrin_cost, tfrin_value,
    tfrout_qty, tfrout_cost, tfrout_value,
    intake_qty, intake_cost, intake_value,
    preturns_qty, preturns_cost, preturns_value,
    adjm_qty, adjm_cost, adjm_value,
    adjw_qty, adjw_cost, adjw_value,
    adjc_qty, adjc_cost, adjc_value,
    adjt_qty, adjt_cost, adjt_value,
    adjv_qty, adjv_cost, adjv_value,
    stockob_qty, stockob_cost, stockob_value,
    fp_stockob_qty, fp_stockob_cost, fp_stockob_value,
    md_stockob_qty, md_stockob_cost, md_stockob_value,
    tm_stockob_qty, tm_stockob_cost, tm_stockob_value,
    stockcl_qty, stockcl_cost, stockcl_value,
    fp_stockcl_qty, fp_stockcl_cost, fp_stockcl_value,
    md_stockcl_qty, md_stockcl_cost, md_stockcl_value,
    se_stockcl_qty, tm_stockcl_cost, tm_stockcl_value,
    tm_stockcl_qty, se_stockcl_cost, se_stockcl_value,
    co_stockcl_qty, co_stockcl_cost, co_stockcl_value,
    currency, exrate1, exrate2, exrate3, exrate4, exrate5
    FROM generate_pgroup_summary_v ) v
    -- On condition includes all fields that are indexed
    ON (v.date_key = w.date_key AND v.ccid = w.ccid AND v.brand = w.brand
    AND v.pgroup = w.pgroup)
    WHEN MATCHED THEN
    UPDATE
    SET w.currency = v.currency,
    w.exrate1 = v.exrate1,
    w.exrate2 = v.exrate2,
    w.exrate3 = v.exrate3,
    w.exrate4 = v.exrate4,
    w.exrate5 = v.exrate5,
    w.sales_qty = v.sales_qty,
    w.sales_cost = v.sales_cost,
    w.sales_value = v.sales_value,
    w.fp_sales_qty = v.fp_sales_qty,
    w.fp_sales_cost = v.fp_sales_cost,
    w.fp_sales_value = v.fp_sales_value,
    w.md_sales_qty = v.md_sales_qty,
    w.md_sales_cost = v.md_sales_cost,
    w.md_sales_value = v.md_sales_value,
    w.sreturns_qty = v.sreturns_qty,
    w.sreturns_cost = v.sreturns_cost,
    w.sreturns_value = v.sreturns_value,
    w.grn_qty = v.grn_qty,
    w.grn_cost = v.grn_cost,
    w.grn_value = v.grn_value,
    w.tfrin_qty = v.tfrin_qty,
    w.tfrin_cost = v.tfrin_cost,
    w.tfrin_value = v.tfrin_value,
    w.tfrout_qty = v.tfrout_qty,
    w.tfrout_cost = v.tfrout_cost,
    w.tfrout_value = v.tfrout_value,
    w.intake_qty = v.intake_qty,
    w.intake_cost = v.intake_cost,
    w.intake_value = v.intake_value,
    w.preturns_qty = v.preturns_qty,
    w.preturns_cost = v.preturns_cost,
    w.preturns_value = v.preturns_value,
    w.adjm_qty = v.adjm_qty,
    w.adjm_cost = v.adjm_cost,
    w.adjm_value = v.adjm_value,
    w.adjw_qty = v.adjw_qty,
    w.adjw_cost = v.adjw_cost,
    w.adjw_value = v.adjw_value,
    w.adjc_qty = v.adjc_qty,
    w.adjc_cost = v.adjc_cost,
    w.adjc_value = v.adjc_value,
    w.adjt_qty = v.adjt_qty,
    w.adjt_cost = v.adjt_cost,
    w.adjt_value = v.adjt_value,
    w.adjv_qty = v.adjv_qty,
    w.adjv_cost = v.adjv_cost,
    w.adjv_value = v.adjv_value,
    w.stockob_qty = v.stockob_qty,
    w.stockob_cost = v.stockob_cost,
    w.stockob_value = v.stockob_value,
    w.fp_stockob_qty = v.fp_stockob_qty,
    w.fp_stockob_cost = v.fp_stockob_cost,
    w.fp_stockob_value = v.fp_stockob_value,
    w.md_stockob_qty = v.md_stockob_qty,
    w.md_stockob_cost = v.md_stockob_cost,
    w.md_stockob_value = v.md_stockob_value,
    w.tm_stockob_qty = v.tm_stockob_qty,
    w.tm_stockob_cost = v.tm_stockob_cost,
    w.tm_stockob_value = v.tm_stockob_value,
    w.stockcl_qty = v.stockcl_qty,
    w.stockcl_cost = v.stockcl_cost,
    w.stockcl_value = v.stockcl_value,
    w.fp_stockcl_qty = v.fp_stockcl_qty,
    w.fp_stockcl_cost = v.fp_stockcl_cost,
    w.fp_stockcl_value = v.fp_stockcl_value,
    w.md_stockcl_qty = v.md_stockcl_qty,
    w.md_stockcl_cost = v.md_stockcl_cost,
    w.md_stockcl_value = v.md_stockcl_value,
    w.se_stockcl_qty = v.se_stockcl_qty,
    w.se_stockcl_cost = v.se_stockcl_cost,
    w.se_stockcl_value = v.se_stockcl_value,
    w.tm_stockcl_qty = v.tm_stockcl_qty,
    w.tm_stockcl_cost = v.tm_stockcl_cost,
    w.tm_stockcl_value = v.tm_stockcl_value,
    w.co_stockcl_qty = v.co_stockcl_qty,
    w.co_stockcl_cost = v.co_stockcl_cost,
    w.co_stockcl_value = v.co_stockcl_value,
    w.modifiedon=stime
    WHEN NOT MATCHED THEN
    INSERT (date_key, ccid, year_id, period_id, week_id,
    company, country,location, brand, mainbrand,
    pgroup,
    sales_qty, sales_cost, sales_value,
    fp_sales_qty, fp_sales_cost, fp_sales_value,
    md_sales_qty, md_sales_cost, md_sales_value,
    sreturns_qty, sreturns_cost, sreturns_value,
    grn_qty, grn_cost, grn_value,
    tfrin_qty, tfrin_cost, tfrin_value,
    tfrout_qty, tfrout_cost, tfrout_value,
    intake_qty, intake_cost, intake_value,
    preturns_qty, preturns_cost, preturns_value,
    adjm_qty, adjm_cost, adjm_value,
    adjw_qty, adjw_cost, adjw_value,
    adjc_qty, adjc_cost, adjc_value,
    adjt_qty, adjt_cost, adjt_value,
    adjv_qty, adjv_cost, adjv_value,
    stockob_qty, stockob_cost, stockob_value,
    fp_stockob_qty, fp_stockob_cost, fp_stockob_value,
    md_stockob_qty, md_stockob_cost, md_stockob_value,
    tm_stockob_qty, tm_stockob_cost, tm_stockob_value,
    stockcl_qty, stockcl_cost, stockcl_value,
    fp_stockcl_qty, fp_stockcl_cost, fp_stockcl_value,
    md_stockcl_qty, md_stockcl_cost, md_stockcl_value,
    se_stockcl_qty, tm_stockcl_cost, tm_stockcl_value,
    tm_stockcl_qty, se_stockcl_cost, se_stockcl_value,
    co_stockcl_qty, co_stockcl_cost, co_stockcl_value,
    currency, exrate1, exrate2, exrate3, exrate4, exrate5,
    modifiedon)
    values
    (v.date_key, v.ccid, v.year_id, v.period_id, v.week_id, v.company, v.country,
    v.location, v.brand, v.mainbrand, v.pgroup,
    v.sales_qty, v.sales_cost, v.sales_value,
    v.fp_sales_qty, v.fp_sales_cost, v.fp_sales_value,
    v.md_sales_qty, v.md_sales_cost, v.md_sales_value,
    v.sreturns_qty, v.sreturns_cost, v.sreturns_value,
    v.grn_qty, v.grn_cost, v.grn_value,
    v.tfrin_qty, v.tfrin_cost, v.tfrin_value,
    v.tfrout_qty, v.tfrout_cost, v.tfrout_value,
    v.intake_qty, v.intake_cost, v.intake_value,
    v.preturns_qty, v.preturns_cost, v.preturns_value,
    v.adjm_qty, v.adjm_cost, v.adjm_value,
    v.adjw_qty, v.adjw_cost, v.adjw_value,
    v.adjc_qty, v.adjc_cost, v.adjc_value,
    v.adjt_qty, v.adjt_cost, v.adjt_value,
    v.adjv_qty, v.adjv_cost, v.adjv_value,
    v.stockob_qty, v.stockob_cost, v.stockob_value,
    v.fp_stockob_qty, v.fp_stockob_cost, v.fp_stockob_value,
    v.md_stockob_qty, v.md_stockob_cost, v.md_stockob_value,
    v.tm_stockob_qty, v.tm_stockob_cost, v.tm_stockob_value,
    v.stockcl_qty, v.stockcl_cost, v.stockcl_value,
    v.fp_stockcl_qty, v.fp_stockcl_cost, v.fp_stockcl_value,
    v.md_stockcl_qty, v.md_stockcl_cost, v.md_stockcl_value,
    v.se_stockcl_qty, v.tm_stockcl_cost, v.tm_stockcl_value,
    v.tm_stockcl_qty, v.se_stockcl_cost, v.se_stockcl_value,
    v.co_stockcl_qty, v.co_stockcl_cost, v.co_stockcl_value,
    v.currency, v.exrate1, v.exrate2, v.exrate3, v.exrate4, v.exrate5,
    stime);

  • Conditional Build tags affecting formatting and merging hyperlinks

    I'm working in RH6 on a number of projects. In all of them I use a specific caption box/format combination for tips and notes. I also use a conditional build tag so I can generate a 'lite' versions of full help, suitable for printing.  I note that on occasions, when I apply the build tag, I lose the formatting on the text - or the entire formatting of the text is applied where I don't want it applied.
    Wrose, still, I find that applying a build tag to a list of hyperlinks can merge the link addresses so they all point to the same area, which is pretty disastrous.
    Is this a bug Adobe know about? Is it fixed in 7 or 8?
    Any advice appreciated.
    Robin

    Hi again
    Well, I wasn't suggesting it wasn't a bug.
    I suppose it's quite likely that something is getting munged. Actually, I think that's rather obvious as it's happening to you.
    I think perhaps the editor is becoming confused. I believe the way these things are handled is by using some specially formatted span tags to apply the CBTs.
    By the way, these new forums now support screen captures. So we no longer have to resort to a reasonable facsimile using only text.
    Sorry I don't really have a workaround to offer here. At this point I'm as puzzled as you are.
    Cheers... Rick
    Click here for Adobe Authorized Captivate and RoboHelp HTML Training
    Click here for the SorcerStone Blog
    Click here for RoboHelp and Captivate eBooks

  • MERGE w/ conditional Insert clause

    Hi--
    Sum Up:Is it possible to run Merge syntax with update and a conditional Insert clauses ?
    Question Details
    Have a base table Emp and staging table New_Emp with a common identifier Emp_id.
    The ideal would be to merge the 2 tables and update Emp using New_Emp values and
    insert only some new emp, not all records.
    Any ideas ? Thks
    Lamine

    Absolutely. See the docs. Use the WHEN and WHERE clauses.
    Tom Best

  • Outbound merge not working with where conditions in 10g

    Hi,
    These are my database details both remote and local database
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionI am doing a merge into a remote database from a local table using below query...
    MERGE into sap_mmd_po_all@cosmic_dev.somedomainname trg using (select * from sap_mmd_cmas_po where upload_flag in ('I','U')) src
      on (trg.PO_NO=src.PO_NO and trg.LINE_DISTRIB_SEQ=src.LINE_DISTRIB_SEQ)
      WHEN MATCHED THEN
        update set
          trg.PO_STATUS_FLG=src.PO_STATUS_FLG,
          trg.SHIP_TO_FACILITY_CD=src.SHIP_TO_FACILITY_CD,
          trg.DELV_TO_PHONE_NO=src.DELV_TO_PHONE_NO,
          trg.DELV_TO_NM=src.DELV_TO_NM,
          trg.DELV_TO_ADDRESS_1=src.DELV_TO_ADDRESS_1,
          trg.PO_ITEM_NO=src.PO_ITEM_NO,
          trg.ITEM_DESCRP=src.ITEM_DESCRP,
          trg.PARTY_NM=src.PARTY_NM,
          trg.VENDOR_ITEM_ID=src.VENDOR_ITEM_ID,
          trg.PO_LN_CRTE_DT=src.PO_LN_CRTE_DT,
          trg.BILL_UOM_CD=src.BILL_UOM_CD,
          trg.COMMODITY_CD=src.COMMODITY_CD,
          trg.COMMODITY_NM=src.COMMODITY_NM,
          trg.BSNSS_UNIT_NO=src.BSNSS_UNIT_NO,
          trg.PO_LN_ORD_QTY=src.PO_LN_ORD_QTY,
          trg.DISTRIB_AMT=src.DISTRIB_AMT,
          trg.PO_LN_DEL_IND=src.PO_LN_DEL_IND,
          trg.PO_DEL_IND=src.PO_DEL_IND,
          trg.PO_TYPE=src.PO_TYPE,
          trg.DOC_DATE=src.DOC_DATE,
          trg.CRTE_DT_TM=src.CRTE_DT_TM,
          trg.UPD_DT_TM=systimestamp,
          trg.SOURCE_SYSTEM=src.SOURCE_SYSTEM,
          trg.PO_LN_LST_CHNGE_DT=src.PO_LN_LST_CHNGE_DT,
          trg.TXJCD=src.TXJCD,
          trg.PLANT=src.PLANT
          where (src.upload_flag='U')--if i remove this then it is working
      WHEN NOT MATCHED THEN
        insert( trg.PO_NO,
                trg.LINE_DISTRIB_SEQ,
                trg.PO_STATUS_FLG,
                trg.SHIP_TO_FACILITY_CD,
                trg.DELV_TO_PHONE_NO,
                trg.DELV_TO_NM,
                trg.DELV_TO_ADDRESS_1,
                trg.PO_ITEM_NO,
                trg.ITEM_DESCRP,
                trg.PARTY_NM,
                trg.VENDOR_ITEM_ID,
                trg.PO_LN_CRTE_DT,
                trg.BILL_UOM_CD,
                trg.COMMODITY_CD,
                trg.COMMODITY_NM,
                trg.BSNSS_UNIT_NO,
                trg.PO_LN_ORD_QTY,
                trg.DISTRIB_AMT,
                trg.PO_LN_DEL_IND,
                trg.PO_DEL_IND,
                trg.PO_TYPE,
                trg.DOC_DATE,
                trg.CRTE_DT_TM,
                trg.UPD_DT_TM,
                trg.SOURCE_SYSTEM,
                trg.PO_LN_LST_CHNGE_DT,
                trg.TXJCD,
                trg.PLANT)
        values( src.PO_NO,
                src.LINE_DISTRIB_SEQ,
                src.PO_STATUS_FLG,
                src.SHIP_TO_FACILITY_CD,
                src.DELV_TO_PHONE_NO,
                src.DELV_TO_NM,
                src.DELV_TO_ADDRESS_1,
                src.PO_ITEM_NO,
                src.ITEM_DESCRP,
                src.PARTY_NM,
                src.VENDOR_ITEM_ID,
                src.PO_LN_CRTE_DT,
                src.BILL_UOM_CD,
                src.COMMODITY_CD,
                src.COMMODITY_NM,
                src.BSNSS_UNIT_NO,
                src.PO_LN_ORD_QTY,
                src.DISTRIB_AMT,
                src.PO_LN_DEL_IND,
                src.PO_DEL_IND,
                src.PO_TYPE,
                src.DOC_DATE,
                systimestamp,
                src.UPD_DT_TM,
                src.SOURCE_SYSTEM,
                src.PO_LN_LST_CHNGE_DT,
                src.TXJCD,
                src.PLANT)
                where src.upload_flag='I'--if i remove this then it is working
                ;And it is throwing an error like...
    SQL Error: ORA-00904: "A3"."UPLOAD_FLAG": invalid identifierBut when I replace the remote table name with local table name then query is functioning fine...
    table structure in local database..
    CREATE TABLE SAP_MMD_CMAS_PO
       (     "PO_NO" VARCHAR2(10 BYTE) NOT NULL ENABLE,
         "LINE_DISTRIB_SEQ" NUMBER NOT NULL ENABLE,
         "PO_STATUS_FLG" VARCHAR2(40 BYTE),
         "SHIP_TO_FACILITY_CD" VARCHAR2(100 BYTE),
         "DELV_TO_PHONE_NO" VARCHAR2(50 BYTE),
         "DELV_TO_NM" VARCHAR2(100 BYTE),
         "DELV_TO_ADDRESS_1" VARCHAR2(1000 BYTE),
         "PO_ITEM_NO" VARCHAR2(100 BYTE),
         "ITEM_DESCRP" VARCHAR2(200 BYTE),
         "PARTY_NM" VARCHAR2(1000 BYTE),
         "VENDOR_ITEM_ID" VARCHAR2(100 BYTE),
         "PO_LN_CRTE_DT" TIMESTAMP (6),
         "BILL_UOM_CD" VARCHAR2(50 BYTE),
         "COMMODITY_CD" VARCHAR2(50 BYTE),
         "COMMODITY_NM" VARCHAR2(50 BYTE),
         "BSNSS_UNIT_NO" VARCHAR2(50 BYTE),
         "PO_LN_ORD_QTY" NUMBER,
         "DISTRIB_AMT" NUMBER,
         "PO_LN_DEL_IND" VARCHAR2(10 BYTE),
         "PO_DEL_IND" VARCHAR2(10 BYTE),
         "PO_TYPE" VARCHAR2(10 BYTE),
         "DOC_DATE" TIMESTAMP (6),
         "CRTE_DT_TM" TIMESTAMP (6),
         "UPD_DT_TM" TIMESTAMP (6),
         "SOURCE_SYSTEM" VARCHAR2(100 BYTE),
         "PO_LN_LST_CHNGE_DT" TIMESTAMP (6),
         "TXJCD" VARCHAR2(50 BYTE),
         "PLANT" VARCHAR2(10 BYTE),
         "UPLOAD_FLAG" VARCHAR2(1 BYTE),
          PRIMARY KEY ("PO_NO", "LINE_DISTRIB_SEQ")
    --table structure in remote database table
    CREATE TABLE SAP_MMD_PO_ALL
       (     "PO_NO" VARCHAR2(10 BYTE) NOT NULL ENABLE,
         "LINE_DISTRIB_SEQ" NUMBER NOT NULL ENABLE,
         "PO_STATUS_FLG" VARCHAR2(40 BYTE),
         "SHIP_TO_FACILITY_CD" VARCHAR2(100 BYTE),
         "DELV_TO_PHONE_NO" VARCHAR2(50 BYTE),
         "DELV_TO_NM" VARCHAR2(100 BYTE),
         "DELV_TO_ADDRESS_1" VARCHAR2(1000 BYTE),
         "PO_ITEM_NO" VARCHAR2(100 BYTE),
         "ITEM_DESCRP" VARCHAR2(200 BYTE),
         "PARTY_NM" VARCHAR2(1000 BYTE),
         "VENDOR_ITEM_ID" VARCHAR2(100 BYTE),
         "PO_LN_CRTE_DT" TIMESTAMP (6),
         "BILL_UOM_CD" VARCHAR2(50 BYTE),
         "COMMODITY_CD" VARCHAR2(50 BYTE),
         "COMMODITY_NM" VARCHAR2(50 BYTE),
         "BSNSS_UNIT_NO" VARCHAR2(50 BYTE),
         "PO_LN_ORD_QTY" NUMBER,
         "DISTRIB_AMT" NUMBER,
         "PO_LN_DEL_IND" VARCHAR2(10 BYTE),
         "PO_DEL_IND" VARCHAR2(10 BYTE),
         "PO_TYPE" VARCHAR2(10 BYTE),
         "DOC_DATE" TIMESTAMP (6),
         "CRTE_DT_TM" TIMESTAMP (6),
         "UPD_DT_TM" TIMESTAMP (6),
         "SOURCE_SYSTEM" VARCHAR2(100 BYTE),
         "PO_LN_LST_CHNGE_DT" TIMESTAMP (6),
         "TXJCD" VARCHAR2(50 BYTE),
         "PLANT" VARCHAR2(10 BYTE),
         "DELETE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N',
          PRIMARY KEY ("PO_NO", "LINE_DISTRIB_SEQ")
      )It seems to me like a bug, but not quite sure...
    your suggestions are appreciated.
    Thanks,
    Ravi Kumar
    Edited by: ravikumar.sv on Dec 14, 2009 1:31 PM
    Commented the where conditions in merge query

    Hi,
    Yes, i hit the same error....
    SQL> ed
    Wrote file afiedt.buf
      1  merge into hr.test1@test_dblink using test2 on (test1.id = test2.id)
      2  when matched then update set test1.col1=test2.col2 where test2.id=2
      3* when not matched then insert (id, col1) values(test2.id,test2.col2)
    SQL> /
    merge into hr.test1@test_dblink using test2 on (test1.id = test2.id)
    ERROR at line 1:
    ORA-00904: "A3"."ID": invalid identifier
    ORA-02063: preceding line from TEST_DBLINKBUT here is a work around...to add the where condition while joining(ON) itself.
    SQL> ed
    Wrote file afiedt.buf
      1  merge into hr.test1@test_dblink using test2 on (test1.id = test2.id and tes
    t2.id=2)
      2  when matched then update set test1.col1=test2.col2
      3* when not matched then insert (id, col1) values(test2.id,test2.col2)
    SQL> /
    2 rows merged.
    SQL>For you the condition would be...
    on (trg.PO_NO=src.PO_NO and trg.LINE_DISTRIB_SEQ=src.LINE_DISTRIB_SEQ AND src.upload_flag='U')cheers,
    Edited by: Avinash Tripathi on Dec 14, 2009 2:53 PM

  • Merging item and condition records

    Hi All,
    I have a requirement to merge item and conditon data . I am using 2LIS_11_VAITM & 2LIS_11_VAKON .
    The key for booking DSO are document number, item number AND calendar day.  I am concerned that we cannot easily link up the records from one DSO to the other, since they are date and even activity dependent.  For example, if more than one change is made to the value of the item in one day, then the condition values will also be different for each change.
    Please suggest on how to go ahead .
    Thanks

    The best thing is to load these datasources to 2 DSOs and then to a Cube.
    One option could be having a consolidation DSO on top of these two, having multiple rule groups to convert the data model from Account based to Key figure based for Conditions data.  You will have multiple condition records for a Sales order item. Order, item & condition type should ideally be the key for the DSO). When loading Conditions to the Consolidation DSO (this would have Order, item as key) you would have multiple transformation rule groups so that key figure from each condition record is updated to one key figure in the DSO. There could be may condition records and there could be new additions in ECC, then you would have to change the objects again. This, I guess is not a good model.
    Enhancing VAITM is not a good option as there would be many condition records for an order item.
    Edited by: Murali Krishna K on Jul 28, 2011 12:01 PM

  • How to change the merge condition in OWB generated code

    Hi,
    This is regarding the OWB generated code for cubes. We required to change the ON condition of MERGE statement. OWB merge the records on the basis of dimension keys only. Is there any ways to provide the customised merge condition or is it possible to add a measure of the cube to be used in ON condition of the merge?

    Hi,
    cant´t you customize the generated Code in the Database?
    I know that owb has the trait to do the following:
    If you create a Mapping, etc. the generated Code will be deployed as PL/SQL Package in the Database Schema.
    Now you can edit the Code as Schema User right in the Database.
    Don´t edit it in the Metadata, only in the Databse.
    If you run now any Process in OWB, he´ll execute your edited Code,
    ´cause he just takes whats still there. :-)
    It´s not realy clean, but in most Times that works.
    LoneWolf

  • Data Merge - Conditional Space?

    how can I insert a conditional space in a mail merge?
    or more simply, when the first, last names are added you must type a space between them or they merge such as "firstlast". And yes, if I put a space between the two fields they merge properly, but when an entry does not have either a first name, or does not contain any first OR last the merge leaves the space on that line. This does not comply with the Content Placement Option setting which is designed to remove 'blank' lines. It doesn't remove because it needs a conditional space such as: If no first name, then no space... etc
    anyone? bueller?! anyone?

    Excel will do a conditional name formatting for you.
    =if(and(isblank(CELLFIRST),isblank(CELLLAST)),"",trim(clean(CELLFIRST&" "&CELLLAST)))
    This would be a "name" column.
    First quotes are quotequote for a blank, second quotes are quotespacequote for the space between names.
    TRIM function does a nice job killing leading spaces, double spaces, etc. CLEAN removes non-printing characters which suck unless you put them in on purpose.
    J

  • Data merge with conditional text

    I'm new to InDesign scripting. Very new, in fact. I'm willing to learn, but my main motivation at present is to solve a particular issue. Surely this issue has come up before. I'd love to know if anybody has encountered it or if it is possible to accomplish through scripting.
    I want to merge data onto a gift pledge card. The exact text on the gift card will depend on the data being imported. For example, somebody who has given in the past will receive a message such as, "Thank you for your gift of $xxx." However, a person who has NOT given into the past will receive the message, "Please consider giving this year." The condition is the field prior_gift. If it's above 0, then the first message is displayed.
    This seems like a natural use for scripting, but, in my searches so far, I've found no references to using conditional text and data merges together in scripting. So, would this be a relatively simple task to accomplish?
    Thanks for any help you can give!

    the data merge feature with indesign only brings in text which was in the original data file itself - it doesn't know how to parse or interpret it to behave differently upon seeing certain results. that is, it doesn't run database queries such as if-else statements - it will only import text which was originally in the data file.
    however, there are plug-ins to indesign that CAN do this but they cost BOATLOADS. are you printing this yourself or are you sending this to a commercial printer? if the latter, have you discussed your print solution with the printer, as they may have a plug-in that can do this type of data merging, and all you would have to do is provide the printer with a packaged native file, along with the data and instructions as to what has to change... and for goodness sake see a proof of it!!!

  • Conditional fields with Data Merge

    I have, what I believe, would be a common question for people using Data Merge in InDesign for business cards.
    I have multiple phone fields, with a small-caps letter to indicate what type (mobile, direct, fax, etc.), i.e.:
    M <<Phone Mobile>>
    D <<Phone Direct>>
    If an employee has only one phone line, how can I make it so that the entire line will be omitted from the final merged doc?
    In the past, I've just gone through the final set and quickly removed extra lines/characters, but I know there's a way!
    Thanks.

    You could also do a find/replace (or, rather two of them if needed) to remove the leading character.
    So for your "D" phone number example, you would do a F/R after the merge like so:
    D <FEFF>\r
    If I remembered the syntax correctly, anyway. It finds the literal 'D' followed by a space, followed by an empty merge field marker, followed by a return. Replace would be with nothing.
    Else consider using a merge product that has the conditional capabilities. Em Software makes one such plug-in. I use Xdata for QuarkXpress a good bit, their InDesign counterpart is called InData.
    Mike

  • Conditional Insert within Merge???

    can we use conditional insert within the merge statement????
    thanks a lot..
    nantha

    NanthaKumarAR wrote:
    is there is any possible way to do so????
    thanks a alot ....
    nanthaHmmm let's look at the conversation so far...
    You: "is this possible?????"
    Me: "No."
    You: "is there is any possible way to do so????"
    I'm now wondering which part of "No" you failed to understand.
    You cannot perform multiple/conditional inserts within a MERGE statement. The purpose of a MERGE statement is to take data and MERGE it into a single table.
    The only messy way I can think of would be to merge into an intermediate table with triggers on it, that takes the merged data and splits it out into the seperate tables. Messy and not likely the best solution to the initial problem, which would probably be better solved by avoiding the use of MERGE in the first place (though we don't know what problem you are actually trying to solve).

Maybe you are looking for