Two Queries in one XSQL-Template

Hi there,
is it possibile to use two queries in one xsql-template, which are generated two seperated trees of XML?
I think about something like that
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsql:query connection="bynet"
null-attribute-indicator="true"
xmlns:xsql="urn:oracle-xsql"
rowset-element = "COLLECTION"
tag-case="upper"
row-element = "FIELD"
id-attribute = "">
select c_formtype from offer_collection
</xsql:query>
<xsql:query connection="bynet"
null-attribute-indicator="true"
xmlns:xsql="urn:oracle-xsql"
rowset-element = "COLLECTION2"
tag-case="upper"
row-element = "FIELD"
id-attribute = "">
select c_formtype from offer_collection2
</xsql:query>
which should give me
<COLLECTION>
<FIELD>
<C_FORMTYPE>lala</C_FORMTYPE>
</FIELD>
</COLLECTION>
<COLLECTION2>
<FIELD>
<C_FORMTYPE>lala</C_FORMTYPE>
</FIELD>
</COLLECTION2>
Any way to do this?
Thanx for help,
Christian Hartmann

Sure, just enclose two <xsql:query> tags by any other outer tag:
<something xmlns:xsql="urn:oracle-xsql" connection="demo">
<xsql:query> select * from emp </xsql:query>
<xsql:query> select * from dept</xsql:query>
</something>

Similar Messages

  • How to embed multiple queries in one web template

    Hi,
    I've a requirement wherein I need to embed two queries in one web template. The first query displays order quantity from a particular customer and the second query displays other information for that customer. Most of my web templates i've contains only one query which i've created using 0ADHOC template saving this as diff template and modifying it. But this is the first time I have got this type of requirement wherein the user drills down on a particular customer for order quantity and then goes for other information from other query.
    Does anyone out there has any idea or suggestion as to how to do this ? One more thing I need to pass the values from one query to another which is akin to RRI concept while staying in the same web template.
    Your suggestions/advices are highly appreciated.
    Thanks in Advance,
    Rash.

    Hi Rash,
    You can do this by including 2 table web items in your template and assiging the 2 different queries as different dataproviders to each. You can try to create a drop down box to filter the customer and in its properties set DataProvider1 and DataProvider2 as the affected data targets.
    Hope this helps...

  • Two Bex Queries in one web template - drill-down should affect both queries

    Hi,
    I would like to have two Bex Queries in one web template with the same selection screen and free characteristics. When drilling-down on characteristics I want both queries to break down the figures. I cannot get the last part to work. We are using version 7.0.
    Any ideas how to make this work?
    BR,
    Tobias

    Hi,
    Refer these links it may be usefulin you case.
    WAD Pdf
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/749a4622-0a01-0010-36bf-b6b30a2a3a22
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/301db65c-f221-2c10-a9a1-f2236e3cea2c

  • How to Combine two queries into One

    Hi Gurus,
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL>
    I have following two queries. How I can convert these two queries into one with the same result ?
    Q1
    SELECT id,vdate,vendorname,venddate,vid
    FROM VENDOR
    WHERE processid=32
    AND venddate is null
    AND vid in(select vid from view_vid where type='PDX')
    AND (id,vdate) not in (select id,vdate from vkfl_is where task_id=55)
    AND (id,vdate) in (select id,vidate from market_data where marketed_date is null)
    AND id not in (select id from location)
    Q2
    SELECT id,vdate,vendorname,venddate,vid
    FROM VENDOR
    WHERE processid=20
    AND venddate is null
    AND vid in(select vid from view_vid where type='PBX')
    AND (id,vdate) not in (select id,vdate from vkfl_is where task_id=40)
    AND (id,vdate) in (select id,vidate from market_data where region_date is null)
    AND id not in (select id from location)
    I can UNION these two queries, but, is there any way I can write a single query with which gives me same result as above two queries?
    Any help would be highly appreciated
    Thanks in advance

    Hi,
    You can do something like this, which will be more efficient than a UNION:
    SELECT  id, vdate, vendorname, venddate, vid
    FROM  vendor
    WHERE  (   (    -- Conditions that apply only to q1
                               processid = 32
                AND  vid       IN (SELECT vid FROM view_vid WHERE type = 'PDX')
                AND (id,vdate) NOT IN ( SELECT id, vdate
                                        FROM   vkfl_is
                                        WHERE  task_id = 55
                AND (id,vdate) IN ( SELECT id, vidate
                                    FROM   market_data
                                    WHERE  marketed_date IS NULL
            OR  (  -- Conditions that apply only to q2
                     processid = 20
                AND  vid       IN (SELECT vid FROM view_vid WHERE type = 'PBX')
                AND (id,vdate) NOT IN ( SELECT id, vdate
                                        FROM   vkfl_is
                                        WHERE  task_id = 40
                AND (id,vdate) IN ( SELECT  id, vidate
                                    FROM  market_data
                                    WHERE  region_date IS NULL
                   -- The remaining conditions apply to both q1 and q2
    AND     venddate   IS NULL
    AND     id         NOT IN (SELECT id FROM location)
    I hope this answers your question.
    If not, post  a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Combining two queries in one..

    Hi,
    Can someone tell me how to combine follwoing two queries in one so that it will increase performance..
    SELECT single PLNNR from AFKO
           into T1
           WHERE AUFNR = '007200000100'.
    SELECT single STATU from PLKO
           into T2
           WHERE PLNNR = T1.

    using subqueries it is possible
    select single statu from plko into t2 where plnnr in (select single plnnr from afko where aufnr eq '007200000100').
    read about subqueries at this link...
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/dc7614099b11d295320000e8353423/frameset.htm
    regards,
    PJ

  • How to combine two queries in one EXCEL

    hi i got one requirement
    i got one excel sheet  from user which contains two  report s(hoe we know whether it is worknook or not) of  2011 data and now user wants 2012 data .now i icluded jan 2012 to dec 2012 in two reports and sent to user.But user is asking these two reports want to see in one sheet.
    so how can i proceed: if i go for work  book  how can i include these two reports in workbook and here my doubt is if i create a workbook based on  these two querie which name i have to give user.Please help me out on the same.
    Regards,
    Madhu.

    Hi Madhu
    Run one query. Click on a empty space in the excel
    From the BEx Design Toolbar -
    >Insert Analysis Grid -
    > Right click on the Design Item
    Edit the DataProvider.....You can ran same or different query with selection. 
    Save the result
    Check this link for detail....I am also searching for something with screenshot
    Regards
    Anindya
    Edited by: Anindya Bose on Feb 14, 2012 3:04 AM

  • Two Queries in one Worksheet

    Hi,
    I'd like to know what the disadvantages are of having two queries in the same worksheet of a workbook. Is it correct that the results of one query can overflow to the area of the second? How about issues with authorization, are there any?
    Thanks!

    HI,
    Yes, result of one can flow over the other if you are using simple report with characteristics and output may vary.
    Actually you apply basic Excel logic and its like 2 diff report on it.
    Mostly you add more Fixed format reports to a single sheet. So that  number of report rows dont increase and also you dont have any free characteristics to drilldown.
    About authorization, that depends on individual reports. If a user doesnt have proper authorization for 1 of the reports then that report would throw error while other would show result.

  • How to include two charts in one web template

    I need to dispaly two charts which are based on same query and on characteristic 1 vs KF's and the other on characteristic 2 vs KF's in one web template.
    How can this be done?
    Thanks in advance,
    Murali.

    When you execute the query in the bex analyzer, perform th enavigation stpes to reach to your desired layout of data. Then from the Save button on the bex toolbar, choose Save > Save View Global. Give it a technical name and  a description. Then log back into the WAD and assign the view as the data provider (Note there are 2 buttons over there: One for query and the other for View)
    Hope this helps...

  • Two queries in one report?

    I have Three tables like
    Device_table columns are
    d_id, d_name, date
    Software_table
    sw_id, software, version, serial_no, sw_type, d_id(foreign_key)
    hardware_table
    hw_id, hardware, specification, d_id(foriegn_key)
    now in reports i want to attach both hardware and software, I have made two quires like
    SELECT d.d_name, sw.software, sw.version, sw.sw_type from
    device_table d, software_table sw
    where d.d_id = sw.d_id
    and second query is
    SELECT d.d_name, hw.hardware, hw.specification
    from device_table d, hardware_table hw
    where d.d_id = hw.d_id
    Now my problem is that how can I add both queries in one report so that i can get a list of software and hardware attached to one device.
    Regards
    Maz

    I want to see the report as follow.
    d_name: CPU-1
    date: -----------
    Software installed:
    sw_id, software, version, serial_no, sw_type
    (list of softwares attached, can be more then one)
    Hardware attached:
    hw_id, hardware, specification (same like software list, it will contain hardware list attached to specific device),
    Please if you can help me that how will i make a query for this.
    Thanks and Regards
    Maz

  • Combining two queries to one

    I have two queries and I would like to output the results as
    one and sort by Name ASC
    Any help would be great thanks

    Either use union in your SQL query or use Coldfusion to
    combine exisitng queries and create a new query resultset.
    Something like this:
    <CFQUERY NAME="getDetailsQuery1"
    DATASOURCE="#DSNNAME#">
    SELECT * FROM getDetailsA
    </CFQUERY>
    <CFQUERY NAME="getDetailsQuery2"
    DATASOURCE="#DSNNAME#">
    SELECT * FROM getDetailsB
    </CFQUERY>
    <CFQUERY NAME="getDetails" DBTYPE="query">
    SELECT * FROM getDetailsQuery1
    UNION
    SELECT * FROM getDetailsQuery2
    ORDER BY Name ASC
    </CFQUERY>
    Hope this helps!
    Cheers / Manu.

  • Two queries in one output in BEx is it possibl ?

    Hi,
               Is there a possibility in Bex Excel screen that we can output two queries at the same time , like 1st query in first half and second query 2nd half of the screen .I think its not possible but just wanna know if anyone came across such an issue
    I know it is possible with WAD ...

    Hi Raj,
    You can execute 2 queries in one work book.First execute one query,place the cursor under query results area,go to tools->Insert query->execute.Save->Save existing work book.
    When ever u open the work book u have to execute both the queries.Instead of executing twice you can use some options, so that it saves and reuses the input values and automatically refresh the queries when u open the work book(If the input values are fixed).
    For that right click->Properties->Intraction tab
    You can see 4 check boxes.check all boxes,ok for all queries and save.So when u open the work book it retrieves data.No need to give input values

  • How do i run two queries in one worksheet?

    Hi
    I am new to Disco and am finding some things easy to fathom and others not so.
    I have a table with fields
    callref
    logdate
    closedate
    I want to be able count the number of calls logged each month/year and the number of calls closed.
    So, I want to do 2 counts, each count applying a slightly different condition. I would then end up with data along the lines of:
    Month, Number Logged, Number Closed
    which I could then turn into a graph.
    I am assuming there must be an obvious way ...
    Sapphie
    Edited by: user12160673 on Feb 8, 2010 8:49 AM

    Hi Lee
    There's a couple of ways of doing this. I think the simplest would be create two calculations, one for Number Logged and one for Number Closed.
    For Number Logged presumably this is just the count of all rows returned in the worksheet? You can use COUNT(ROWNUM) for that calculation.
    For the Number Closed you only want to count those that have a closedate - yes? If so, this will work:
    SUM(CASE WHEN closedate is NOT NULL THEN 1 ELSE 0)
    Another way to do this, would be to create two analytic calculations, one for each count. The syntax for an analytic count is as follows:
    COUNT(item) OVER (filters)
    The item will be the thing you are counting. The filters can be left empty, in which case the count will be determined by all rows in the worksheet. If you want the count to be only on a subset of the rows then you need to provide one or more filters. Typical filters are page items and group sorted items.
    An example of a count over the whole query is:
    COUNT(callref) OVER ()
    Best wishes
    Michael

  • Two Queries In One Workbook With Calculations

    Hi Guys,
    Can you have 2 queries in one worksheet, either ran as a query or save as a workbook and calculation done at runtime.  For example, query A and query B to show up in one sheet when you run query A.  You now want a simple calculation done......for example.......A1 row from query A divided by B1 row from query B.  The result to show up on the Key Figure structure in query A.
    Thanks,
    Recca
    Edited by: Recca Recca on Jul 11, 2011 4:45 PM

    Hi,
    I am not sure about this but we had similar kind of requirement and what we did was,
    One query in one tab, another query on second tab and we did key figure calculations on third tab of the workbook eg. Sheet1 A1 - Sheet2-A1 and the result was stored on sheet3.
    We saved the workbook and used to refresh the same whenever we want to see new data.
    Regards,
    Durgesh.

  • Two queries to one question or how to query TV Scheduler

    In my procedure I need to query an existed view, which has the follow columns: broadcasting_day_id (unique), broadcasting_date, channel_id and version and so.
    If I have broadcasting_day_id, than I need to use WHERE broadcasting_day_id = my_parameter_1, if no, than I use WHERE broadcasting_date = my_param_2 AND channel_id = my_param_2 AND version = my_param_3.
    Right now I have implemented it using IF broadcasting_day_id is not null THEN SELECT .... FROM .... WHERE broadcasting_day_id = my_param_1 ELSE WHERE
    broadcasting_date = my_param_2 AND channel_id = my_param_2 AND version = my_param_3.
    I would like to know if this is a good approach and if there is a way to combine those two statements in one, please?
    Thanks in advance

    Hi,
    If your query is fairly complicated and you don't like to repeat it, you could try something like:
    WHERE  broadcasting_day_id =   NVL2 (my_parameter_1, my_parameter_1, broadcasting_day_id)
           AND broadcasting_date = NVL2 (my_parameter_1, broadcasting_date, my_param_2)
           AND channel_id =        NVL2 (my_parameter_1, channel_id, my_param_3)
           AND version =           NVL2 (my_parameter_1, version, my_param_4);(Assuming you have four different parameters, you mentioned p2 twice)
    Regards
    Peter
    Edit:
    Yes, I know - looks kinda stupid after Ganesh got his nvl2 logic right ;)
    Edited by: Peter on Apr 27, 2011 1:44 PM

  • How to fire two queries in one bean

    When I am trying to fire two queries using statement and result set
    it is showing error "result set is closed".
    How to fire two queries?

    Just do it. The ResultSet should be the result of the query. So you're working on a wrong reference or something.

Maybe you are looking for

  • Code syntax error in header using a template?

    Now running CS5 DW in a 32 bit Windows/Vista ultimate environment. The improved error messages have brought to light a problem that I apparently have had for a long time but didn't know it as CS4 simply flagged the line but no message. Many of my sit

  • Final Cut Pro version 1 and OS 9 Classic?

    Will my old copy of Final Cut Pro 1 work in the OS 9 Classic environment? Has anyone tried this? I used to run FCP 1 on a PowerMac G3 and want to run it on my Powerbook G4. I know about the updates to the new versions , but I was wondering if FCP 1 w

  • Help with iPhoto?!

    My iPhoto attempts to load when I plug in my phone to my computer, yet nothing comes up.

  • Getting my movie dvd's onto my IPad.

    I have a large movie DVD collection, and would like to view my favorites on my iPad. These are MY movies, and I want to take some with me in my travels on my iPad. Are there any ways to get the movies onto iTunes, and then to my iPad? Help is appreci

  • If you can't connect TRY THIS

    If you are having really slow internet or repeatedly geeting connection errors Do this RE-INSTALL YOUR ROUTERS FIRMWARE... even if you have already updated it before the new MacBook. My other Macs were connecting with out issues, but not the MacBook.