How to implement sub-queries in data template.

Hi All,
I am new to Bi Publisher.
Requirement is to pass resultset of first query to second query to get correct measure value.
Query1: (c1,c2)
Query2: (c3,c4,c5,c6)
I have to pass c1, c2 to query2 to get correct measures values (c5,c6).
Condition to be used c3 IN c1 and C4 IN C2.
Here multiple values of C1 and C2 needs to be passed to Query2.
Please help me Masters.
Thanks,
Ammu

Only way i see this working is if you find a way to join the result set of each of them (commom column in each query).
If you manage this step then at this point you have two options:
a) explicitly join the queries in the data template
Example: http://blogs.oracle.com/xmlpublisher/entry/multiple_datasources_i and http://blogs.oracle.com/xmlpublisher/entry/multiple_datasources_ii
b) Or else use XPATH in your RTF to join them
First approach is easier, second approach is a bit more complicated but possible.
Sorry we cannot help more as this is particular to your case.
regards
Jorge
p.s. If this answers your original question then please grant the points and close the thread

Similar Messages

  • How to Implement Hireachical Queries in ODI?

    Hello All,
    Please let me know how to implement Hierarchical Queries in ODI 11.1.1.6.?
    Pls provide any example if possible.
    Thanks
    Ravikiran

    there is no native way to use hierarchical queries.
    you will have to modify KM
    It depends on your exact needs.

  • How to create Sub Queries In Webi

    Hi,
    we are creating webi reports by using BICS connection..
    Now my requirement is how to create sub queries in webi.
    Any one give me suggestions how to achieve this
    Regards,
    G

    Hi Bhargav,
    Below is thread related to same topic-
    http://scn.sap.com/thread/3430274
    ~Anuj

  • How to implement real-time refresh datas in obiee?

    How to implement real-time refresh datas in obiee?

    Can you elaborate more...
    If you want to see refreshed data in OBIEE Reports, you need to implement Caching mechanism based on how you often refresh warehouse..
    [http://download.oracle.com/docs/cd/E05553_01/books/admintool/admintool_QueryCaching6.html]

  • How to pass the parameter in "Data Template"

    Hi,
    Can any one please help me out to sort the problem, "Passing Parameter and checking condition for the parameters in the "data template".
    And also please tell me how to link the multiple query in "Data template", as per the user guide i have it says to use link tag. But its not working with my "Data template".
    Please check the data template given below and help me out to sort the problem.
    And one more thing is in table the data type for number and name is varchar. I dono weather i can use that data type in "Data template", please let me know if i can.
    <?xml version="1.0"?>
    <dataTemplate name="VENODR_DETAILS">
    <parameters>
    <parameter name="VENDOR_NUM" dataType="number"/>
    <parameter name="VENDOR_NAME" dataType="char"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT pv.segment1 ven_num,
              pv.vendor_name vname,
                          pvs.vendor_site_code VEN_SIT_CODE,
              pvs.purchasing_site_flag PURCH_SIT_FLG,
              pvs.pay_site_flag PAY_SIT_FLG,
              pv.vendor_name VENDOR_ADDR_NAME,
              pvs.address_line1 VENDOR_ADDR1,
              pvs.address_line2 VENDOR_ADDR2,
              pvs.city VENDOR_CITY,
              pvs.state VENDOR_STATE,
              pvs.zip VENDOR_ZIP
    FROM vendors pv,supplier_info pvi,vendor_sites_all pvs
    where pv.segment1 = pvi.vendor_id(+)
    and pv.vendor_id = pvs.vendor_id
    and (pv.segment1=:VENDOR_NUM or pv.vendor_name=:VENDOR_NAME)
    ]]>
    </sqlStatement>
    <sqlStatement name="Q2">
    <![CDATA[select pvc.area_code||'-'||pvc.phone Contact_Phone,
    pvc.last_name||' '||pvc.first_name||' '||pvc.middle_name cname
    from vendor_contacts pvc,vendor_sites_all pvs,vendors pv
    where pvs.vendor_site_id = pvc.vendor_site_id
    and pv.vendor_id = pvs.vendor_id
    and pv.segment1=(pv.segment1=:VENDOR_NUM or pv.vendor_name=:VENDOR_NAME)
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="VENDOR" source="Q1">
    <element name="VENDOR_NUMBER" value="ven_num"/>
    <element name="VENDOR_NAME" value="vname"/>
    <element name="CATEGORY" value="VENDOR_CAT"/>
    <element name="UPDATE_DATE" value="UPDATE_DT"/>
         <group name="VENDOR_SITE" source="Q1">
         <element name="VEN_SIT_CODE" value="VEN_SIT_CODE"/>
         <element name="PURCH_SIT_FLG" value="PURCH_SIT_FLG"/>
         <element name="PAY_SIT_FLG" value="PAY_SIT_FLG"/>
         <element name="VENDOR_ADDR1" value="VENDOR_ADDR1"/>
         <element name="VENDOR_ADDR2" value="VENDOR_ADDR2"/>
         <element name="VENDOR_CITY" value="VENDOR_CITY"/>
         <element name="VENDOR_STATE" value="VENDOR_STATE"/>
         <element name="VENDOR_ZIP" value="VENDOR_ZIP"/>
         </group>
    </group>
    <group name="VENDOR_CONTACT" source="Q2">
    <element name="Contact_Phone" value="Contact_Phone"/>
    <element name="cname" value="cname"/>
    </group>
    </dataStructure>
    </dataTemplate>
    Thanks in advance.
    Regards,
    SP

    Hi Rani,
    I see one issue in the Q2 with the where statement:
    and pv.segment1=(pv.segment1=:VENDOR_NUM or pv.vendor_name=:VENDOR_NAME)
    the right one should be
    and pv.vendor_id = :VEN_VENDOR_ID
    the variable VEN_VENDOR_ID you have to select from the first query Q1. Add here after select
    pv.vendor_id VEN_VENDOR_ID,
    Regarding the other question about the data types, well, number and varchar2 is fine, perhaps char also, but go with varchar2 instead.
    One last note: you should not mix uppercase and lowercase, keep it clear and structured, check your element names and values.
    Best Regards
    Volker

  • How to add sub pages in iWeb templates

    Anybody knows how to add a sub pages in the templates? I want to add sub pages under the main header, e.g. "About Us."

    Just to say that you can do it in the way that Steve has already said and I did this on one of my sites and it worked really well.
    Lets take your example of About George. You create your page About George and you include this page in your navigation menu. Now lets suppose that you have more that you want to add about George with two other pages - George at Work and George at Play. You want to link to these pages from About George, but you don't want the page names visible. Well, you can do this by creating the pages and then going to Inspector. Click on pages and then check don't include in navigation menu. Then you can create links on the About George page to get to the other pages George at Work and George at Play - use shapes or text boxes to create these with something like Back and Next on those pages to take you forward to the next page and then back to the main page.
    I think you will need to create your own nav bar to be able to achieve this, as it means linking to different pages, but it does work well.

  • Group xml data from different sql queries in data template

    Hello,
    I need to do a mailing program with bursting that sends differents alerts in one mail.
    For example i can have alerts for late orders, alerts for shipping not confirmed, so really different address (I dont want to use union). I have done three sql statement in data template , it gives the following ouput.
    <GA_EMAIL>[email protected]</GA_EMAIL>
    <G_ALERTS_1>
    <ALERT>
    </ALERT>
    <ALERT>
    </ALERT>
    </G_ALERTS_1>
    </GA_EMAIL>
    <GA_EMAIL>[email protected]</GA_EMAIL>
    <G_ALERTS_1>
    <ALERT>
    </ALERT>
    </G_ALERTS_1>
    </GA_EMAIL>
    <GA_EMAIL>[email protected]</GA_EMAIL>
    <G_ALERTS_2>
    </G_ALERTS_2>
    </GA_EMAIL>
    I woud like the bursting or data template to group alerts when email is the same, because here it sends an email for each different alert.
    Ideal output would be:
    <GA_EMAIL>[email protected]</GA_EMAIL>
    <G_ALERTS_1>
    <ALERT>
    </ALERT>
    <ALERT>
    </ALERT>
    </G_ALERTS_1>
    <G_ALERTS_2>
    </G_ALERTS_2>
    </GA_EMAIL>
    But I don't know how to group different sql statements on a common field (email)
    Any ideas ?
    Thanks

    the for-each group works well in a rtf template, but the rtf template is only applied after the bursting (in order I get first data template (instead of a report) -> bursting -> rtf template)
    I want to be able to group xml data from the data template, so I can do bursting (by email ) but only once per mail.

  • How to implement aggregation for different date periods

    We have a report which shows various metrics for a given date period, selected by date prompts.
    The problem is that one of the metrics should show data only for the first day in the range, selected by the prompt.
    So, for example, if user selects in the prompt the range Oct 1 - Oct 10, then that particular column should only show data for Oct 1, while all others - for Oct 1 - Oct 10.
    Any suggestions how to implement this would be appreciated.

    Please try to play around with case statements in the fact column.

  • How to use Report Parameter  on Data Template

    Hello All ,
    I 've tried to create a Report using Data template and Report Parameter. I create a report using data template and I also created a parameter (P_company_name).
    Data Template :
    <dataTemplate name="test_Data_template" description="test" dataSourceRef="test">
    <parameters>
    <parameter name="company_name" dataType="character" include_in_output="false" defaultValue= *** HOW TO DEFINE THE REPORT PARAMETER (P_Company_name) HERE ** />
    </parameters>
    <dataQuery><sqlStatement name="Q1"> <![CDATA[SELECT customer_no,Company_name, from customers where acquisition_id = :company_name  ]]>
    </sqlStatement>
    Report Parameter
    Identifier : P_Company_name
    Data Type : String
    Default Value : Test
    Parameter Type : Text
    When the endusers run the Report they will provide the Company name through the report parameter.
    I have tried to use the same approach that I used to pass the Parameter to SqlQuery on data Template but it is not working . XML Publisher cannot define the parameter.
    How can I do that ?
    If you have any suggestion or document I will really appreciate.
    Thanks,
    Robson

    use this <parameter name="P_Company_name" dataType="character" include_in_output="false" defaultValue= 'Test Value' />and in the querySELECT customer_no,Company_name, from customers where acquisition_id = :P_Company_namehttp://download.oracle.com/docs/cd/E12844_01/doc/bip.1013/e12187/T421739T434255.htm
    Just keep the parameter name in datatemplate and the definition same.

  • Linking two queries in Data Template

    All,
    Hoping to get a little help here. I have a basic data template and inside of it there are 2 queries. I would like to use a field from Query 1 and use it in Query 2. I have used the Bind Variable and Data Links (both work but I am getting what looks like a cartizian product). Query 1 is not a Parent-child relationship to Query 2, I simply just want to use the value of the field from Query 1 in Query 2.
    Example:
    Query 1 returns:
    5 rows of 'A'
    10 rows of 'B'
    Query 2:
    Using 'A' it returns 2 values
    Using 'B' it returns 5 values
    I want to use the value 'A' and 'B' from Query 1 in Query 2.
    Everytime I use a data link or bind variable it would return 10 rows for 'A' and 50 rows for 'B' in Query 2.
    I am not sure if there is a way to fix the queries themselves or if it would be something in the grouping logic that would handle this. When using the Bind Variables I noticed the second query(Q2) has to be inside 'G_SEQ' in order to return any data. I would prefer not to post the
    queries due to sensitive data restrictions.
    Here is the data structure I am currently using.
    <dataStructure>
    <group name="G_SEQ" source="Q1">
    <element name="MATERIAL_TYPE" value="MATERIAL_TYPE"/>
    <element name="GROUP_TYPE" value="GROUP_TYPE"/>
    <element name="COL1" value="COL1" />
    <element name="COL2" value="COL2" />
    <element name="COL3" value="COL3" />
    <element name="COL4" value="COL4" />
    <element name="COL5" value="COL5" />
    <element name="COL6" value="COL6" />
    <element name="CF_ISSUE_TO_LINE_TOTAL" value="D_COL1" function="SUM()"/>
    <element name="CP_ISS_TO_LN_TOT_LESS_10" value="D_COL1" function="SUM()"/>
    <group name="G_1" source="Q1">
    <element name="D_COL1" value="D_COL1"/>
    <element name="P_COL1" value="P_COL1"/>
    <element name="YR_PER_COL1" value="YR_PER_COL1"/>
    <element name="P_PER_COL1" value="P_PER_COL1"/>
    <element name="D_COL2" value="D_COL2"/>
    <element name="P_COL2" value="P_COL2"/>
    <element name="YR_PER_COL2" value="YR_PER_COL2"/>
    <element name="P_PER_COL2" value="P_PER_COL2"/>
    <element name="D_COL3" value="D_COL3"/>
    <element name="P_COL3" value="P_COL3"/>
    <element name="YR_PER_COL3" value="YR_PER_COL3"/>
    <element name="P_PER_COL3" value="P_PER_COL3"/>
    <element name="D_COL4" value="D_COL4"/>
    <element name="P_COL4" value="P_COL4"/>
    <element name="YR_PER_COL4" value="YR_PER_COL4"/>
    <element name="P_PER_COL4" value="P_PER_COL4"/>
    <element name="D_COL5" value="D_COL5"/>
    <element name="P_COL5" value="P_COL5"/>
    <element name="YR_PER_COL5" value="YR_PER_COL5"/>
    <element name="P_PER_COL5" value="P_PER_COL5"/>
    <element name="D_COL6" value="D_COL6"/>
    <element name="P_COL6" value="P_COL6"/>
    <element name="YR_PER_COL6" value="YR_PER_COL6"/>
    <element name="P_PER_COL6" value="P_PER_COL6"/>
    </group>
    <group name="G_SUPPLIER" source="Q2">
    <element name="supplier" value="supplier"/>
    <element name="grade" value="grade"/>
    <element name="bdft" value="bdft"/>
    <element name="part" value="part"/>
    <element name="trans_source" value="trans_source"/>
    </group>
    </group>
    </dataStructure>
    Thanks,
    Jason

    Steven thanks again for your response.
    You are correct that it will give me the correct data, though, the issue still lies in connecting the data. For example in my original question:
    Example:
    Query 1 returns:
    5 rows of 'A'
    10 rows of 'B'
    Query 2:
    Using 'A' it returns 2 values
    Using 'B' it returns 5 values
    I want to be able to display the results like this:
    Results for Query 1(A)
    Results from Query 2(A)
    Results from Query 1(B)
    Results from Query 2(B)
    or in terms of the data above
    5 rows of 'A'
    Using 'A' return the 2 values(or rows)
    10 rows of 'B'
    Using 'B' return the 5 values(or rows)
    I believe in the case you pointed out it would do the following because the first query returned 'A' and 'B':
    Results for Query 1(A)
    Results from Query 2(A)
    Results from Query 2(B)
    Results from Query 1(B)
    Results from Query 2(A)
    Results from Query 2(B)
    or in terms of the data above
    5 rows of 'A'
    Using 'A' return the 2 values(or rows)
    Using 'B' return the 5 values(or rows)
    10 rows of 'B'
    Using 'A' return the 2 values(or rows)
    Using 'B' return the 5 values(or rows)
    Thanks again for your help, it is much appreciated!
    Jason

  • How to include Sub List into List template?

    Hi,
    how can I include the content of a sub list into the parent list entry.
    A simple example (my original code is more complicated with divs, ...)
    I want to produce the following output:
    &lt;li>Master List Entry 1
      &lt;ul>
        &lt;li>Sub List Entry 1&lt;/li>
        &lt;li>Sub List Entry 2&lt;/li>
      &lt;/ul>
    &lt;/li>
    &lt;li>Master List Entry 2&lt;/li>In the property "List Template Current with Sub List Items" I would like to specify
    &lt;li>Master List Entry 1
      #SUBLIST#
    &lt;/li>But it looks like that there is no substitution value to place the content of the sub list, it is always added after the "Master List Entry".
    Can anyone help?
    Patrick
    My APEX Blog: http://www.inside-oracle-apex.com/
    The APEX Builder Plugin: http://builderplugin.oracleapex.info/ New
    The ApexLib Framework: http://apexlib.sourceforge.net/

    Hello,
    This has been added as an enhancement request.
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • Need idea on how to implement this - repeating monthly data on day level

    Hi all, i had run into the following thing, this may soung easy, but i'm searching for the best solution:
    i have a dataset per the stores of the customer, the dataset is an asset count on the end of the specific month. I must not sum the data between two/N months.
    We they need to do several querries like
    sales/assets/day
    Sales/itemgroup/asset/day
    sales/salesperson/asset/day
    etc.
    My problem is that i have this data on a month&store level, but i need to provide a solution, so it could be handled as a "global" value on that, so they can query it "almost any ways".
    I don't really want to generate day/other level data based on this, so any tricks, how to repeat the data in all lines for that specific month on presentation/Business level?
    All ideas are welcome.
    Thanks&Regards,
    D
    Edited by: user8113564 on 2012.09.11. 4:52

    Sorry if I took this wrong but are you try to do level based measured
    Take the same physical column in the fact and have one aggregated at a month level and the other at a day level.
    If yes, make sure you build a date dimension hierarchy and mapped at the correct level to the fact. Then take your measure and correctly define them at the correct level, day, month etc
    This should sort it out

  • How to delete the queries and WAD templates from the SAP BI

    HI,
         We had a task to delete the list of quires and WAD templates from the SAP BI landscape(development,quality and production servers)
    Please suggest the process to follow for removing the quires from the SAP BI landscape.

    Hi Venkata,
    I assume that the DEV-QA -PRD are in Sync with each other.
    When you are deleting a query from the DEV,it should ask for a NEW transport request.IF not it means it is collected in some other request ,may be in NA or in Junk request.So see to it that it is FIRST saved in your request and then using RSZDELETE T .Code you can delete it.When you transport the request to QA or to PRD ,the query automatically gets deleted from that landscape.
    Let me know if there are any issues.
    Rgds
    SVU123

  • How to implement non linear navigation Date LOV

    Hi,
    I have a requirement like I need to show non linear combo LOV in my UI which allows the user to navigate to next or previous item in the list.
    Any help on this or do we have any inbuilt design pattern for this component.
    I am using Jdev 11.1.1.7.0.
    Many thanks in advance.
    Regards,
    Dileep.

    Hi Frank,
    Thank you so much for your reply. Sorry, I am not able to attach that component image here.
    Actually it looks like normal combo box LOV, additionally it has two navigation icons both the sides (both left and right hand side) of combo box and allow the user to navigate to previous or next item in the list of values available in the combo box.
    I am not sure whether it is fusion specific custom component or adf component. Any help on this?
    Many thanks in advance.
    Regards,
    Dileep.

  • How to get concurrent pgm request id in data template

    Hi,
    I need concurrent pgm request id in datatemplate as one of the param.Some thing like :P_CONC_REQUEST_ID in reports.How can i read requestid in data template.
    Please help
    Regards,
    ashok

    put this as first line in RTF
    <?param@begin:P_CONC_REQUEST_ID?>
    Then you can use it inside like
    <?$P_CONC_REQUEST_ID?> to display.
    Any parameter for that matter, just add them as first line, and use it.

Maybe you are looking for

  • Importing a table in DI at runtime.

    Hi everyone, Is it possible to import a table at runtime in DI? Instead of importing it prior using it, I want to import it at runtime. Is this possible? Regards,

  • Creating new task in inbox

    Hi, In EP, under the inbox screen there's a 'Tasks' tab where we can create a new Task by clicking the 'Create Task' button. My question is: Is there any FM or class/method that I can use to perform the same functionality to create that Task?. Thanks

  • To find exit for the transaction VF02?

    Hi Experts, I need help for this enhancement. 1.     In case of Company Code - 2200                                              During VF02 (Billing document flow to accounting) :  VBPA - PARVW                     value for "ZC" shall be filled in B

  • Cisco 5508 HA - Webauth Bundle for multiple SSID/multiple web pages

    Hi Guys, I have 2* cisco 5508 WLC in HA mode . Both are running IOS 7.5.102.0 . Everything is working perfectly fine. I need to Creat 3 differnet SSID and Creat 3 different login Pages for them . Each user from respective SSID will get specified logi

  • Night filming

    Why is it that when I film in daytime my footage looks great. But night filming look grainy fuzz like in back ground??????