How to combine multiple queries!

I know this is pretty basic, but I'm confused. Basically, I need to extract all data for a given entity from a highly normalized database. There are probably 2 dozen tables which contain data for a given entity that must be queried. However, rather than constructing one single query that merges all of the tables together to come up with one huge rowset/row format, how could I query each table seperately and combine the results of each query into one XML file? Can I create a clob with the first query and then append subsequent queries to that clob? Not sure what to do, and I can't find any good examples.
Thanks in advance!

Thanks, but I don't think that's quite what I'm looking for. In a nutshell, this is what I'm doing and this is the problem I'm having:
1. I set a string equal to a query.
2. I use xmlgen.getxml to fetch the xml into a clob.
3. I parse the clob into a DOMDocument.
The problem occurs with multiple queries. If I follow this same process for 5 different queries, then I have 5 instances of a DOMDocument, each holding a different queries XML. Now, can I put them together? I tried xmldom.makeNode for each DOMDocument, but the nodes are associated with the Document from which they came. I tried cloning each node to disassociate from it's Document, but that didn't seem to work. Even if it did, and I got all of the nodes together, I kept getting a java.lang.ClassCastException for trying xmldom.makeDocument for a node. I'm lost. How can I combine the results of multiple queries into a single DOMDocument instance? It was suggested that use xmlgen.getXML to get multiple queries into multiple CLOBS, then essentially combine the CLOBS together, and finally parse into a DOMDocument as a last step, but that doesn't really leverage DOMs capabilities. At this point, I may have to go down that road...

Similar Messages

  • How to execute multiple queries in one stored procedure.

    Hi,
    I am Kumar,
    How to execute multiple queries in one stored procedure.
    here is the my requirements,
    1. get the max value from one table and sum of the that value.
    2. insert the values and also sum of the max value.
    using stored procedure
    I am using SQL server 2000 database.
    Please help me.
    Advance thanks
    by,
    Kumar

    This is not a java question and it is not even a problem: your only problem is
    1) lack of knowledge
    2) lack of interest to find a manual
    But you are going to have to change both by actually reading a book or a manual that explains the stored procedure language of SQL Server. It is the same as Sybase I think, so you could also look for a manual for that DBMS.

  • HT4059 I'm trying to organize my PDFs in iBooks on my ipad2 and I can't figure out how to combine multiple PDFs into one. Any thoughts?

    I'm trying to organize my PDFs in iBooks on my ipad2 and can't figure out how to combine multiple PDFs into one. Any thoughts?

    I'm trying to organize my PDFs in iBooks on my ipad2 and can't figure out how to combine multiple PDFs into one. Any thoughts?

  • How to combine multiple Unmanaged Solution to one single Managed solution

    Hi,
    How to combine multiple Unmanaged Solution to one single Managed solution.?
    There were some other third party developer have kept things lik ein UAT there are 2 release solution and both are Managed Solution.
    And in Production the changes are only deployed for release 1 and for the release 2 changes deployment needs to be done.
    But when i import that second release Managed Solution from UAT to Production then i got number of elements missing but i have checked they are already there in Soolution.
    I did some R&D on this but not much helpful.
    I thought i require to convert Unmanaged Solution of Production environment to Managed first for first release and then needs to import Managed solution of UAT to Production for second release.
    Is this the right way to overcome form this situation?
    Any help and response would be really appreciated.
    Thanks.
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Hi, 
    You can prepare unmanaged solution by adding all the components from the default solution,which are there in the managed solution, If Customizatiable entity is true in  the managed solution.

  • How to Combine Multiple Physical Queries

    Hi All,
    I have a big reports with over 70-80 columns in Answer. This is not a Pivot report. Now it is generating 3 physical queries .
    I need to merge this 3 queries into a single query. But it seems very hard to implement.
    Couple of points:
    1. Report is generating 3 physical queries. All queries are GROUP BY queries and each of them giving different count separately
    2. If we find a way to combine. The result would be different from Answers Report Result (This is my assumption)
    3. How Answer is combining the results from 3 queries and showing us the result?
    Any input or thought is high appreciated.
    I'm totally stuck in there. Tried different ways. But is there any solution for this that I'm not able to think?
    Pls Help
    Thanks in Advance
    Regards
    Sudipta

    Hi Kranthi,
    Thanks for you reply.
    I need to combine multiple report queries into one and give it to ETL guys. I don't have to do anything in Answers. This is my requirement.
    I'm good in SQL. So I tried to combine like the following. Taking a small scenario.
    In this case, Anlytics is generating following 2 queries:
    Query 1:
    select sum(x), [Fact column]
    sum(y), [Fact column]
    column1, [Dim column]
    column2, [Dim column]
    column3, [Dim column]
    from table1,table2,table3
    where [All joins]
    group by column1,column2,column3
    Query 2:
    select sum(z), [Fact column]
    column1, [Dim column]
    column2, [Dim column]
    column3, [Dim column]
    from table1,table2,table3
    where [All joins]
    group by column1,column2,column3
    I'm trying to combine it:
    Query 1:
    select sum(x), [Fact column]
    sum(y), [Fact column]
    sum(z), [Fact column]
    column1, [Dim column]
    column2, [Dim column]
    column3, [Dim column]
    from
    (select sum(x), [Fact column]
    sum(y), [Fact column]
    column1, [Dim column]
    column2, [Dim column]
    column3, [Dim column]
    from table1,table2,table3
    where [All joins]
    group by column1,column2,column3
    ) q1,
    select sum(z), [Fact column]
    column1, [Dim column]
    column2, [Dim column]
    column3, [Dim column]
    from table1,table2,table3
    where [All joins]
    group by column1,column2,column3
    ) q2
    where
    q1.column1=q2.column1 and
    q1.column2=q2.column2 and
    q1.column3=q2.column3
    But i think it is not the correct way may be, as i'm getting a bit different count. So the where conditions are not matching for the 2 queries above.
    Any thought on this?
    Thanks
    Sudipta

  • How to combine multiple purchased aac files into one aac file

    I recently purchased in iTunes an album consisting of 16 m4a files.  I ended up creating a playlist in iTunes for the songs.  I would like to create one m4a file which combines all and then play it in iTunes.  Is the copy protection preventing me from doing so?
    I know how to convert m4a files that I have converted to mp3 and combine them using Terminal with a cat command.  Then I import that combined file into iTunes.  All is well in this case.  I tried this with the 16 m4a files and I could not import the resultant mp3 file into iTunes.
    Any way to combine multiple purchased aac files?

    A simple way to accomplish the job, though not recommended is to print the 2 page file to a new PDF with multi-up (assuming you select vertical rather than horizontal locations) and adjust the paper in the Adobe PDF printer to be 8.5X22. At least you might give it a shot. Some variation, along with rotation possibly, might work.

  • How to Combine multiple files into the one file?

    Hi all,
    How do I combine multiple canon hf10 avchd files into the one file with a new extension. No need to be compressed.
    Afterwards, I also want to split this combined file to original files.
    Need Help!

    Yes, angelanna. You can merge or split your video file via FCP sequence.
    ahaah, maybe I think angelanna would like to get the resulting file with MTS format because he mentioned “No need to be compressed”. Are you asking for this, angelanna?
    If so, a simple MTS files managing and editing tool  is needed. Maybe you can have a try the Mac version of Aunsoft Final Mate for managing HD camcorder footages. I just downloaded its free trial version and it offers a simple way of garping footages directly  from camcorder. And also it provides a attractive feature to join flawlessly and split accurately native MTS files for video file output with original MTS format.
    Maybe this is the tool cwhich an help you out, angelanna.
    Enjoy your video.

  • How to combine multiple MailAttachement-x payload to One -Help Please ?

    Hi Friends  ,
                      In my scenario My Mail sender Adapter reading attachment . It works fine for 1 attachement but <b>if more than</b> one comes<b> It is reading all</b> attachements  <b>but  it is converting the First attachement only  to XML format </b> , rest  of files are left as it is.
             Can you please tell me how to combine all the Mailattachements and then covert into XML ?
              In our Mail  Sender configurations  , I am giving parameters for MessageTransFormBean like
               xml.documentName                -    MT_Row
               xml.documentNameSpace      -     http://com.test
                xml.fieldNames                      -    Details
               xml.fieldSeparator                   -     ' \n'
               xml.ProcessFieldNames         -  FromConfiguration
      In PayLoadSwapBean
               i am giving propertieslike Content-Description , Content-Disposition , attachement;filename="MailAttchement-1.txt" and all other configuration i am giving.
           I am not clear as if will it WorkFor Multiple attachement ? I can understand as it wil work for Only one attachement . But if i can get multiple attachemnt 1 with proper XML conversion  ( our DataType )  , rest of files are  with out XML
    conversion . How can i process those files also as XML converted ?
            Expecting your reply asap !
    Regards .,
    V.Rangarajan

    > Can you please tell me how to combine all
    >  the Mailattachements and then covert into XML ?
    This is not possible without a self-written adapter module.
    Regards
    Stefan

  • How to combine count() queries to tables in different environments?

    Hi all,
    I've got two tables that have the same schema, but slightly different data. One is a test db, and the other is a model office db (i.e. neither is a production db).
    I run these two queries, individually, from within the test db:
    select count(cdeSource), cdeSource
    from schema1.SomeTable
    group by cdeSource
    order by cdeSource
    select count(cdeSource), cdeSource
    from schema1.SomeTable@TheModelOfficeDB
    group by cdeSource
    order by cdeSource
    The column cdeSource can contain a 1 to 1 relationship with another field in the tables, but it can also contain a 1 to many with the other field.
    Right now, I need to export each result into a file and then do a compare between the two to find the differences, between the two tables, out of the big results.
    Question: How can I combine those two queires into 1, and show only the differences from the "count(cdeSource)" results column?
    Thanks.
    Edited by: we5inelgr on Jan 29, 2013 5:29 PM

    we5inelgr wrote:
    Example snippet of results:
    Test environment
    Count(cdeSource) | cdeSource
    2 | "00.01" <---Same as other environment, would like to exclude
    6 | "00.09" <---Same as other environment, would like to exclude
    16 | "00.50" <---Different count, for same cdeSource. need to include
    2 | "00.95" <---cdeSource only found in Test. need to include
    2 | "72.1" <---Different count, for same cdeSource. need to include
    Model Office environment
    Count(cdeSource) | cdeSource
    2 | "00.01"
    6 | "00.09"
    10 | "00.50"
    3 | "72.1"
    6 | "98.1" <---cdeSource only found in Model Office. need to include
    I tried putting "MINUS" in between both queries, and it gives me an error: ORA-00933: SQL command not properly ended.
    I tried wrapping that whole query, within a select * from () but gave me a different error: ORA-00907: missing right parenthesis
    Other ideas how to combine the two?
    Thanks.if & when you use valid syntax, then no errors get thrown.
    We can not tell you what you do wrong, since you don't use COPY & PASTE to show us what exactly you do.
    SELECT cdeSource, COUNT(cdeSource) FROM TABLE1
    MINUS
    SELECT cdeSource, COUNT(cdeSource) FROM TABLE1@remote_db;

  • How to run multiple queries in a report 6i

    hi!
    i have multiple queries that i have created in data model
    how can i invoke them in my report?
    thanks!

    Every query is run automatically. You can have a Q1 and Q2 and display results of Q1 on one page, and the results of Q2 on another.

  • How to insert multiple queries into a single worksheet of same dataprovider

    Hello friends,
    My question is same as this.I want to know how to create a single worksheet(workbook) embedded with multiple queries of same DATA PROVIDER with different VARIABLES assigned to each query.
    Please,send me the relevant steps.
    Regards,
    Mohan Chand Reddy A

    Hi,
    You need to create one query workbook and rest of the queries you can insert manually from Bex tool -
    insert query.
    You need to insert query by adding one more tab in the workbook.
    Keep in mind only one thing that variable ..if you are going to keep variable it will keep on popping up for user entry in it.
    So try to have common variable in the first query and then those value needs to get fed into other query variable as they are running so without any user entry while execution we can see results in all the queries in the workbook.
    If you want to insert a query into a new workbook:
    Choose the symbol for Open...from the BEx toolbar. This brings you to the screen Open SAP BEx:
    Select Queries from the left column.
    Select a query from all those available. The queries are arranged according to InfoProviders.
    Double-click on the required query or choose OK.
    If you want to insert a query into the active workbook:
    Open a workbook and, from the BEx toolbar, choose Tools ® Insert Query.... The query is then inserted into the current worksheet starting at the active cell.
    If you want to insert a query into a workbook template:
    Create a workbook template.
    Insert the query into the workbook template.
    Thanks and regards
    Kiran

  • How to embed multiple queries in single workbook

    Hi,
               I am working in BI 7.0 environment. My requirement is
    1) I have 6 different SD queries.
    2) I need to create workbook out of each query.
    3) I need to embed workbook created from each query into a single work book (each worksheet in workbook should have workbook created from 1single query).
    This way the final workbook will have six work sheets with six different queries (all saved as workbooks).
    Can anyone please give me an idea to create the workbook.
    We are latest version of Excel.
    Thanks in advance.

    Hi Padma,
       You can embed multiple queries in a workbook.Please follow below steps.
    1. Open the query in a Bex analyzer (first query)
    2. Go to second tab and select a cell and insert anlaysis item (second icon on the Bex Toolbar)
    3. Right click and assign query to the data provider.
    4. Goto next tab and insert analysis item for third query . Similarly you can insert many queries but embedding multiple queries will degrade performace.
    5. Goto workbook settings (last icon in Bex tool bar) for workbook properties like refresh workbook on open. pop up variable screen on refresh etc.
    Also please go thru below links .
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/45583ca544eb
    51e10000000a114084/content.htm
    Hope this helps. Let me know if you have any queries.
    Regards
    Suvarna

  • How to combine multiple files in CS6

    I am trying to combine multiple files-- book chapters-- into a single editable document in CS6. Tutorials apprea outdated

    following on from Sandee Cohen's post no.18, the location of the script has moved to:
    http://www.simonwiscombe.com/indesign-merging-all-files/
    and it is worth noting that the script initially merged files that were all 1pp long each.
    Simon did make a modification to it later on in the article so that the script would merge files of all lengths, but when I ran the script, it produced an error to do with line 18. The line:
    var sourceFolder = Folder.selectDialog(“Select a folder with source InDesign files.”);
    needs to be replaced with
    var sourceFolder = Folder.selectDialog('Select a folder with source InDesign files.');
    (double quotes were swapped out for single quotes)
    I have only tested the script with varying page lengths with minimal objects on the pages to determine if the files merged. So far so good. The earlier version that merged 1pp files only would fail if fonts/links were missing as any dialog box upon opening seems to interfere with the script. I feel that the newer script will do the same thing.
    I know this is an older thread but given I just had the same experience, I thought the revised script would help a few people.
    Colin

  • How to combine multiple movie clips from iphone 4 in iphoto 09

    I have multiple videos taken from iphone 4 downloaded to iphoto 09. How can i combine them all into one movie?

    We, as you know, are only users - we can not answer any "why" questions - only Apple knows why - we can sometimes answer How to questions - How to is use iMovie
    LN

  • How to combine multiple podcast folders into one

    When I open itunes Podcast section I find that it shows multiple folders or podcasts with the same name. I want these to show up as just one podcast. How can I do this?
    For example:
    When I look at my HD>itunes>Podcast folder; I see one folder called "Ask Dave", but in my itunes podcast column it show three separate "Ask Dave" podcasts. I want it to show only one.
    Similar but different example:
    A podcast that I have subscribed to for several years has changed its name slightly; Podcast_Photoshop User TV, Photoshop User TV, Photoshop TV, NAPP TV.
    I have 4 folders as I listed in my itunes>Podcast folder. But in the itunes window it lists  9 folders: 1 - Podcast_Photoshop User TV, 5 - Photoshop User TV, 2 - Photoshop TV, 1 - NAPP TV.
    These are all the same podcast, and I'd to have just one folder / entry in my itunes window called Photoshop TV and have everything show up in one place.
    Is there a way to consolidate these and others?
    I'm running Leopard and iTunes10
    thanks in advance for any help with this.
    JeffN

    The problem happens when the feed url is changed.
    See these posts:
    https://discussions.apple.com/message/13222888#13222888
    https://discussions.apple.com/message/15228638#15228638
    tt2

Maybe you are looking for

  • IPOD  Not Recognized USB Connection

    How do i get my 40Gb IPOD to work with a USB Connection, I can only use my IPOD with the Firewire connection. Is it possible to use both the Firewire and USB connections without totally restoring my IPOD

  • As2 issue with loader

    I have been working on this for a minute and cannot seem to find out where I am going wrong been over the code several times and get the same result In my first layer I have 3 frames with unsing as2 Layer 1 frame 1 i have action  script movieSize = t

  • How to eliminate duplicate copies after doing a sort

    I did a filter/sort across 100's of folders then exported the results to a separate folder. I later noticed way too many duplicates in the new folder. Does Lightroom have a feature to automatically remove or eliminate duplicates when doing such a pro

  • HT3702 Unable to make purchases via iTunes for gaming apps

    Every time I go to make a purchase on Kingdom Age....it keeps saying contact iTunes support to continue payment

  • Processing big edi file

    I am trying to process bigger file in biztalk orchestation, my observation is very slow. I have requirement that will get edi file and I need to convert it in to xml file for ERP. As my requirement is very simple I just create map and generating corr