Conditional Join in MAP

Hi,
Is there a way to have a map with 2 tables but join them conditionally.
Need to Update Table C using Table A but join TABLE B only certain condition is met. I can achieve it using PL/SQL procedure by creating Dynamic Select Statements. Can it be done with Maps ?
Appreciate you help in this regard.
-V

Carsten Herbe wrote:
Hi,
I would not recommend using views in owb mappings. With views you just hide the complexity of mappings outside the owb, i.e. you cannot tell from the mappings where your data is coming from. You also lose some benefits from lineage analysis.
Regards,
Carsten.Ops,
i would leave it to you to decide whats best for him based on complexity of the mapping , business & strategic approach etc. There are pros and cons and the approach that is best suited to your business should be adopted.
Quote
====
My advice would be to try and convert your data source to a relational table/view and using the mapping editor. This will allow you to benefit from the many new features within OLAP cube storage such as compressed composites, data compression, paralled processing, partitioning and aggregation maps.
UnQUOTE
======
This Quote is coming straight from OWB product development Manager from Oracle.
Also the point made by Carsten needs to be considered.

Similar Messages

  • Question about a conditional join

    Is it possible to do a conditional join based on a field in a table?
    say I have the query below and the table fields ate the bottom. I am trying to get the exact syntax for doing a conditional join. Can any one help?
    Thanks
    select e.fname,e.lname,a.areaname
    FROM employee e
    JOIN area a ON (If e.newareaid is not null and date being searched for >= e.movedate then a.areaid = e.newareaid ELSE a.areaid = e.areaid
    ======================================================
    For example
    Employee table
    empid
    areaid
    fname
    lname
    newareaid
    movedate
    Area table
    areaid
    areaname

    Hi,
    In this particular case, the complicated join condition can be simplified considerably.
    There are 2 situations that have different join conditions, but in each situation a.areaid has to match something (let's call it join_id) from the employee table, and that can be determined just by looking at the row in the employee table. If we decide what join_id is before starting the join, then the join condition will be quite simple:
    WITH     got_join_id
         SELECT     fname, lname, areaid, newareaid
         ,     CASE
                  WHEN  newareaid              IS NOT NULL
                  AND       date_being_searched_for   >= movedate
                      THEN  newareaid
                   ELSE  areaid
              END     AS join_id
         FROM     employee
    SELECT  e.fname, e.lname, a.areaname
    FROM      got_join_id  e
    JOIN      area           a   ON  a.areaid = e.join_id
    ;You could also skip the sub-query, and put the CASE expression in the join condition:
    SELECT  e.fname, e.lname, a.areaname
    FROM      got_join_id  e
    JOIN      area           a   ON  a.areaid = CASE
                                 WHEN  newareaid              IS NOT NULL
                                     AND       date_being_searched_for   >= movedate
                                        THEN  newareaid
                                  ELSE  areaid
                             END
    ;This is basically what Hoek did, except Hoek complicated it by putting the comparison to a.areaid inside the CASE expression.
    Edited by: Frank Kulash on Apr 15, 2013 3:22 PM

  • Spliting files based on condition using multi mapping with BPM

    Hi All,
    Can any one please let me know How to <b>Splite the outbound records based on condition using multi mapping with Integration Process in BPM</b>?
    Thanks
    Govindu.

    Hi All,
    Sorry for mistake this question for Exchange infrastructure guys.
    Thanks,
    Govindu

  • ViewObject : Conditional Join Option in ADF

    Hi,
    I have a viewObject A and B which are connect by viewLinks from 1 to * relationship. So it is certain that whenever i make a call to this view Object it will have join operation also been called. But my requirement or test is to have something that does conditional join when required. For example i have a search form with a checkBox that is for weather to include the join or exclude the join. and result is shown in the table below according to whether a checkbox in search form was checked or not.
    => I came up with Dynamic SQL query which might solve my test case but i am wondering if there is best adf ways to do that... Also i am concern about performance since i will be dealing with huge data.
    Thanks
    jdev :11.1.1.3.0
    Edited by: 896719 on Jan 9, 2013 12:47 PM

    Hi
    Excuse me,My English isn't very good.
    you can set bind variable through EL, you should add Depno from Dept VO to the page binding and then set it to the bind variable
    but After you choose Deptno you should run the second View Obj(Emp VO) through bean.
    Habib

  • Dynamic WHERE or conditional JOIN?

    I have a 3 table join that I need to filter in either of two ways depending on row data. Initially I had the following select statement:
    SELECT Warnings.WarningID, Subscriptions.UserID, Accounts.AccountName, Accounts.Ask, Warnings.Direction, Warnings.Rate, Warnings.Active
    FROM Warnings INNER JOIN
    Subscriptions ON Warnings.SubscriptionID = Subscriptions.SubscriptionID INNER JOIN
    Accounts ON Subscriptions.AccountID = Accounts.AccountID
    WHERE (Warnings.Active = 1)
    My problem is to filter this further. Warnings.Direction is a bit where 0 means '<' and 1 means '>' and is meant to be used to differentiate between 'Accounts.Ask > Warnings.Rate' and 'Accounts.Ask < Warnings.Rate' so that I can select whatever
    is relevant for each row.
    I went through a series of failed attempts focusing on the WHERE clause, but then I tried the Design Query Editor and it produced a condition JOIN instead. The closest I've come so far is this is this:
    SELECT Warnings.WarningID, Subscriptions.UserID, Accounts.AccountName, Accounts.Ask, Warnings.Direction, Warnings.Rate, Warnings.Active
    FROM Warnings INNER JOIN
    Subscriptions ON Warnings.SubscriptionID = Subscriptions.SubscriptionID INNER JOIN
    Accounts ON Subscriptions.AccountID = Accounts.AccountID AND Accounts.Ask < Warnings.Rate
    WHERE (Warnings.Active = 1)
    which at least filters correctly for '<'. Is it possible to update this maybe with a CASE statement so that the conditional JOIN can tackle either Warnings.Direction option? Something along the lines of:
    SELECT Warnings.WarningID, Subscriptions.UserID, Accounts.AccountName, Accounts.Ask, Warnings.Direction, Warnings.Rate, Warnings.Active
    FROM Warnings INNER JOIN
    Subscriptions ON Warnings.SubscriptionID = Subscriptions.SubscriptionID INNER JOIN
    Accounts ON Subscriptions.AccountID = Accounts.AccountID AND
    CASE
    WHEN Warnings.Direction=0 THEN Accounts.Ask < Warnings.Rate
    WHEN Warnings.Direction=1 THEN Accounts.Ask > Warnings.Rate
    END
    WHERE (Warnings.Active = 1)
    This doesn't work, but could it, or am I barking up the wrong tree?
    Not sure I'm expressing myself understandably here, but the point is to return all true Warnings, regardless of whether it's '1.0828 < 1.0900' or '1.0828 > 1.0800' as both are true at the same time. Any way to fix this?
    TIA!
    Dennis

    I think this is what you're looking for...
    SELECT
    w.WarningID,
    s.UserID,
    a.AccountName,
    a.Ask,
    w.Direction,
    w.Rate,
    w.Active
    FROM
    Warnings w
    INNER JOIN Subscriptions s
    ON w.SubscriptionID = s.SubscriptionID
    INNER JOIN Accounts a
    ON s.AccountID = a.AccountID
    WHERE
    w.Active = 1
    AND 1 = CASE
    WHEN w.Direction = 1 AND a.Ask > w.Rate THEN 1
    WHEN w.Direction = 0 AND a.Ask < w.Rate THEN 1
    ELSE 0
    END
    HTH,
    Jason
    Jason Long

  • Mapping condition in multi mapping

    Hi Experts,
    I have a 1:n multimapping where I have a mapping condition such that
    If the field is empty ith should throw an error.
    At the same time the n-1 records should be processed...
    The UDF i have used is
    if (a == "")
    throw new RuntimeException();
    else
    return a;
    As of now the entire interface fails ...
    Any idea on what I should do???

    Hi Ravi,
    What i understood your requirement is suppose if you have 100 records in one file you are sending as a individual BAPIs messages ,if there is no value for certain filed you need to stop the process and with alert email.
    my solution for this read one record at a time from CSV,set record set per message value in sender file adapter is 1,it reads one record at a time,then check the condition in mapping,use enhanced receiver determination to check the condition.
    Create one service for sending an email,use mail adapter,one bussines system for RFC.
    if your condition fails(no value)then cal service to send an email,if condition succes then sal bussiness system in and develope interface mapping for the same.
    You need to check the every record ,i think you can use my approach,any clarifications needed let me know.
    Regards,
    raj

  • Using Right-justified and left zero-filled condition in message mapping of

    Hi,
    My Interface is outbound Interface.
    Suppose source field named 'MobNumber' is mapped with Target field named 'MobileNumber'.Condition is AS IS(Right-justified and left zero-filled).
    How should i do this mapping?
    Thanks,
    Sanghamitra

    Hi Sanghamitra,
         Similar question ahs been answered earlier in this thread
    Re: Message Mapping using Left justified, right blank/space filled
    just replace the filler variable by zero in my post
    One small request, if you think your questions are being answered correctly and properly, please kindly, if possible, close down the threads. This way forum members/users  who later look up for solutions to similar problem, they know for sure that the problem was finally solved, with the solutions provided in the thread.   
    regards
    Anupam
    Edited by: anupamsap on Aug 3, 2011 11:27 AM

  • Need to create two nodes based on one condition in message mapping.

    Hi Experts,
                    In my mapping I have two different nodes. If my condition is true then only one node should be created otherwise both the nodes should be created.
    requirement is I need to print. one header before first item record and after every 200 item records.
    i.e I need to create header node if (item recordno) is 1 or (item recordno % 200) is 1. I have tried using this condition. But Iam getting all the header records( 3 headers for 600 items) in sequece and then all  item records (600).
    i want 1 header then 200 items , then again header followed by 200 items. so on.
    Can any body help.
    Thanks&Regards,
    REYAZ HUSSAIN

    Hi REYAZ HUSSAIN,
    as graphical mapping is "target field mapping" this is not possible. The parser for graphical mapping traverses the taget message from the first element to the last!
    You need another kind (ABAP, XSLT, JAVA) of mapping.
    Regards Mario

  • Need assistance with conditional join in SQL

    Hi All -
    I need to ask for help with this query:
    Create table user_tab_col_test (table_name varchar2(30), column_name varchar2(30), data_type varchar2(30));
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table1', 'column1', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table1', 'column2', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table1', 'column3', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table1', 'column4', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', 'column1', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', 'column2', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', 'column3', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', 'column4', 'varchar2')
    Commit;
    Create table all_cons_columns_test (table_name varchar2(30), column_name varchar2(30), constraint_name varchar2(30))
    Insert into all_cons_columns_test (table_name, column_name, constraint_name) values ('table1', 'column1', 'primary')
    Insert into all_cons_columns_test (table_name, column_name, constraint_name) values ('table1', 'column1', 'secondary')
    Commit;
    This is my query and the current result:
    Select u.table_name, u.column_name, c.constraint_name
    From user_tab_col_test u
    Left outer join all_cons_columns_test c
    On ( u.table_name = c.table_name
    AND U.COLUMN_NAME = C.COLUMN_NAME
    AND C.CONSTRAINT_NAME IN ('primary'))
    order by U.table_name, U.COLUMN_NAME;
    TABLE_NAME COLUMN_NAME CONSTRAINT_NAME
    table1 column1 primary
    table1 column2
    table1 column3
    table2 column1
    table2 column2
    Three questions:
    1) I only want to return results where table_name = 'table1'. I can't seem to get this to work.
    2) Is my query proper and is this the best way to return my desired results? I.e. I want all columns from user_tab_col_test and I only want to display the constraint_name from all_cons_columns_test if the constraint_name = 'primary'.
    3) Will the synatx be the same if I need to join a third table to all_cons_columns_test?
    Any advice/suggestions are much appreciated -
    john
    Edited by: user703358 on Jan 11, 2013 8:57 PM
    Edited by: user703358 on Jan 11, 2013 9:48 PM

    Hi,
    user703358 wrote:
    ... ALL_CONSTRAINTS_TEST joins to ALL_CONS_COLUMNS_TEST on TABLE_NAME and CONSTRAINT_NAME. If you adapt this to use the data dictionary views ALL_CONSTRAINTS and ALL_CONS_COLUMNS, then rememeber to join on the OWNER column, also.
    Ultimately I want to use ALL_CONSTRAINTS_TEST.CONSTRAINT_TYPE = 'P' in my WHERE clause, instead of C.CONSTRAINT_NAME IN (primary), only because the constraint_type is a more definitive attribute than just the name of the constraint.
    I tried something like the query below but I'm getting
    ORA-00904: "U"."COLUMN_NAME": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:  
    *Action:
    Error at Line: 8 Column: 16Errors like that are caused by trying to mix old join syntax with ANSI join syntax in the same query.
    SELECT    u.table_name
    ,       u.column_name
    ,       C.CONSTRAINT_NAME
    FROM           USER_TAB_COL_TEST      U,
    ALL_CONSTRAINTS_TEST ACAbove is an example of an old-style join: there is a comma between the table names, and the join conditions are included in the WHERE clause below.
    LEFT OUTER JOIN  all_cons_columns_test  c
    ON    u.table_name    = c.table_name
    AND   U.COLUMN_NAME    = C.COLUMN_NAMEThis is an example of an ANSI-style join: the keyword JOIN appears between the table names, and the join conditions are right here, after the keyword ON.
    WHERE      U.TABLE_NAME    = 'table1'
    AND C.TABLE_NAME = AC.TABLE_NAME
    AND C.CONSTRAINT_NAME = AC.CONSTRAINT_NAME
    and AC.CONSTRAINT_TYPE = 'P'
    ORDER BY  u.table_name
    ,           u.column_name
    ;While it is possible to use both join styles in the same query, it's a really bad idea. I suggest always using ANSI syntax, especially for outer joins, but whatever style you choose, use it consistently for all joins in the same query.
    In this case, you want an inner join between tablec c and ac, so the ANSI syntax would be something like
    FROM  u  LEFT OUTER JOIN c ON ... JOIN ac ON ...In this case, it's very important that the inner join between c and ac is done before the outer join with u. How can you make sure that happens? Well, if you have an arithmetic expression such as
    12 * 5 - 1and you want to make sure the subtraction of 1 from 5 takes place before the multiplication by 12, what do you do? You can add parentheses:
    12 * ( 5 - 1 )In ANSI join syntax, you can use parentheses the same way:
    FROM  u  LEFT OUTER JOIN ( c ON ... JOIN ac ON ... )or, in full:
    SELECT    u.table_name
    ,        u.column_name
    ,        c.constraint_name
    ,       ac.constraint_type
    FROM             user_tab_col_test      u
    LEFT OUTER JOIN  (
                             all_cons_columns_test  c
               JOIN  all_constraints_test   ac
                                 ON   ac.table_name     = c.table_name
                          AND  ac.constraint_name     = c.constraint_name
                            ON    u.table_name       = c.table_name
                   AND   u.column_name       = c.column_name
                   AND   ac.constraint_type  = 'P'
    WHERE       u.table_name     = 'table1'
    ORDER BY  u.table_name
    ,            u.column_name
    ;Output:
    TABLE_NAME COLUMN_NAME CONSTRAINT_NAME CONSTRAINT_TYPE
    table1     column1     primary         P
    table1     column2
    table1     column3
    table1     column4

  • Data Foundation table joins with filters (multi-conditional joins)

    My environment: Crystal Server 2011, Business View Manager 14.0.2.364, Crystal Reports 2011 with SP2 and FP28
    In our existing database we make use of a single lookup table for many different types of selection lists.
    For example, the lookup table might have selections for all of the US States (ex: NonUniqueIDValue = 123,  Value1=TX, Value2=Texas, LookupType=US_STATES) and another list of selections for OrderStatus (ex: NonUniqueIDValue = 123,   Value1=OPEN, Value2=NULL, LookupType=ORDER_STATUS).
    It is necessary to supply addtional filtering on the join statement since the IDVaule for these entries are NOT unique.
    Using SQL written joins for the two examples above would look like this:
    join lookupTable on lookupTable.NonUniqueIDValue = mainTable.US_StateID AND lookupTable.LookupType = 'US_STATES'
    join lookupTable on lookupTable.NonUniqueIDValue = mainTable.OrderStatus AND lookupTable.LookupType = 'ORDER_STATUS'
    I am new to Business Views and don't readily see a solution since it appears the DF Linking window only suports single basic conditional testing (<, >, =, etc) . How can I accomplish this in my DF or elsewhere in the BV?
    I would greatly appreciate any feedback or insight anyone might have on how to accomplish these kinds of filtered joins.
    Thanks in advance...

    Hi Paul
    If the query returns 100,000,000 rows, there will be performance issues of the report based on the connection and the datasource you are using.
    If you use a Command Object or a Stored Procedure the query will be directly executed at the database level and the performance will not be affected much.
    Hope this helps!
    Thanks

  • SD- conditions to be mapped to COPA value field data in BI

    Hi Experts,
    I have a req where in I have to map condition level Sales order data to some COPA value fields. Currently for one Sale order item there are multiple conditions that means multiple line items. But when I try to find the COPA value field for the same same (Sales order, Sales order item ) key I get only one line item.
    This has to be done for BI integration, but needs to be done at the source system level.
    So my questions are,
    1) How can we get the condition level data from COPA? Is it possible to fetch the data at that granularity?
    2) Is it possible to integrate SD & COPA data on condition level i.e. at Sales order, sales order item & condition level.

    Hi,
    In KEA0, Data structure tab click on pencil button (change view).
    Then click on -> change
    Now you will be able to select new value fields
    Rememeber, after changing click on save, activate and then back button. system will ask for regeneration, click ok.
    Regards
    Raghu

  • How to use OMB to change filter conditions in OWB maps

    Hi,
    I want to know how we can use OMB to change filter conditions in an OWB map.
    As per my scenario i have a filter operator FLTR_1 in my maps and i have to change its filter condition from
    INOUTGRP1.ID IN (1,2)
    AND
    INOUTGRP1.VALUE > CONST_0_MAX_VAL
    to
    INOUTGRP1.ID IN (1,2)
    AND
    INOUTGRP1.VALUE > CONST_6_MAX_VAL
    Just for everybody's information we are migrating from OWB 9.2 to OWB 10.2 and we have called procedures in constants and used their values in filter conditions.OWB 10.2 generates the values for constants in a different way than OWB 9.2 thats why this change is required.I wish to automate the act of changing constant names so we can save time in changing the maps.
    Thx

    Carsten,
    I created a map in OWB 10.2 and ran the following command
    The filter operator name in this map is FILTER
    Carsten Herbe wrote:
    OMBALTER MAPPING 'TEST_MAP' MODIFY OPEARTOR 'FILTER' SET PROPERTIES (FILTER_CONDITION) VALUES ('INOUTGRP1.ID IN (1,2) AND INOUTGRP1.VALUE > CONST_6_MAX_VAL ')
    I got this error:
    OMB02933: Error getting child object of type OPEARTOR with name FILTER: MMM1034:
    Property OPEARTOR does not exist.
    Could you pls help on this.
    Thx

  • How to acheive IF elseif elseif else  condition using std mapping functions

    How to perform the following mapping using standard graphical functions:
    if (a = 1)
    result.addValue("3");
    else if (a = 2)
    result.addValue("6");
    else if (a = 5)
    result.addvalue("7");
    else if (a = 10)
    result.addValue("11");
    else
    result.addValue(a);
    can this requirement be acheived without using a UDF?
    Regards
    bhasker

    UDF is better way to get this done.
    you try like this using Standard function:
                                               Const 3    /THEN     
                                      (A equals 1)   IF              (output of ifThenElse) ->TragetFiled
                                                            \ELSE
                                                  /THEN     /(output of IfThenElse input to else of first If)
                                              IF               /
                                                 \ELSE
    Like wise for other conditions....
    In else part of ifThenElse, give the output of second ifThenElse. here in ths case you need four ifThenElse.
    CodeGenerated:
    /ns0:MT_/targetFIELD = iF(const([value=3]), stringEquals(/ns0:MT_XML_OB/A=, const([value=1])),
    iF(const([value=6]), stringEquals(/ns0:MT_XML_OB/A=, const([value=2])),
    iF(const([value=7]), stringEquals(/ns0:MT_XML_OB/A=, const([value=5])),
    iF(const([value=11]), stringEquals(/ns0:MT_XML_OB/A=, const[value=10])), /ns0:MT_XML_OB/A=))))
    Ritu
    Edited by: Ritu Sinha on Apr 13, 2009 2:48 PM

  • Illustrator - Join paths - map design

    I am working in CS5 on a map design.  I have overlapping roads that I want to connect together so that the paths smoothly join together similar to this:
    So I have all of  my roads drawn out:
    Then I select my roads and Object --> Path --> Join and get this:
    The intersections are just what I want, but I don't want it to connect the endpoints of the roads together.  What am I doing wrong??
    Thanks!

    Something like this?
    Just Group the lines and apply a New Stroke at the Group level. You example looks like you used Cmd(Ctrl)-J which joins the lines.

  • How to Insert data in 3 table without use of join 1table mapped rule define

    1.Table SOL_K
    A B C D – Columns Name
    C D A B –Coulmns Values Defined (Rule --- Defined)
    2.SECOND table SIC_K
    SIC_ K
    A B C D
    Kamal Micky NULL MANOJ
    3 Table SIC_Mapping
    Same Columns A B C D based On Table SOL_K defined rule
    I want to insert values(from table SIC K) into table SICMapping Table with the help of first table(SOL_K)(mapped rule)
    Required Result SIC_Mapping Table
    The output will be come like this.
    A B C D — Columns Name
    NULL MANOJ Kamal Micky ---- Came based on defined Mapping Rule

    This is the forum for issues with the SQL Developer tool. You will get better answers in the SQL and PL/SQL forum.

Maybe you are looking for

  • MemberSet parametres in an EvDRE report/schedule (SAP BPC NW 7.5, SP03)

    Hi, I'm struggling combining MemberSet keywords and filtering values in an EvDRE schedule/report. The aim is to create an input schedule (or report) based on a hierarchy, but where a number of the dimension members are excluded (filtered). Below a br

  • How to change the Purchase requisition when control key is PP02

    Hi Exports:   I want to change the  purchase requisition which was created after  production order was  released . The  control key is  pp02.   I  changed the purchase requisition in OPJP .but I got an error .   the error message is   " Acct. assign.

  • Problems with Elements 7 Backup/Sync

    I have PSE 7 and have previously loaded albums I created in PSE 7 up to Photoshop.com.  Today I created a new album w/all JPEG files.  My PSE 7 is set to automatically upload to Photoshop.com when a new album is created....but after 4 hours now, not

  • Help with ASO function

    Hi all, I need some help with ASO mdx function. Avg({Leaves([Employees].Currentmember)}, [Calculated_Field]). This will give me the average for Calculated_Field for all levels of Employees. But i want to add more dimensions like Region and year. Plea

  • Cant access files from Mavericks Partition

    I have OS X Lion and Mavericks installed on the one SSD of my MBP. I want to access my music, pictures, movies and so fourth from my Mavericks Partition on my Lion one. But whenever I goto the Mavericks partition folder there are all these small stop