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

Similar Messages

  • 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 create multiple physical channels using DAQmx?

    Hi, I am new to Labview.
    Can anyone please help me on how to create multiple physical channels? I am following the LabVIEW examples in the NI example finder but they are only for acquiring signals from one channel.
    Actually, I am using the channels of an SCXI 1520 to measure voltage signals. And one more thing, in the NI Example Finder, they are sample codes there for setting the filter in SCXI 114x.
    Will this example work with an SCXI 1520, too?
    Thanks!

    There are many ways to read multiple channels in LabVIEW. First, if you look at that example that lets you set the filter setting on the 114x and you click on the 'Physical Channel Listbox' then click 'Browse' you can see that you can select multiple channels. After you select the channels and hit 'Ok' it will build a multiple channel string. This is one way to read multiple channels.
    Next, you can create a 'Task' in Measurement and Automation Explorer(MAX). When you create this task select all the channels that you need to read then back in LabVIEW simply select a 'DAQmx Task Name Constant' Select the task you just created and wire that to an Input of your first DAQ VI. If you do this you do not need to have a 'DAQmx Create Physical Channel' VI or create
    Task because it is already created in MAX.
    When looking at example VIs you can tell if a multi-channel read is acceptable by looking at the 'DAQmx Read' and if it says NChan that means it will do a multichannel read. There are tons of example programs that will display the multichannel read capabilities.
    This example may not work for the 1520 because the properties that are set could possibly be specific to the 142x. When using the 1520 though it is very likely that the properties will be very similar if not exact. You will simply put a DAQmx Channel property node on your block diagram and then look for the Lowpass filter settings properties that will most likely be in the same location. Now another way todo this without using a property node would be in MAX when you create a task set the filter settings from the Device tab in the task configure window.
    Let me know if you need anymore help with reguards to this issue! Have a great day!
    Allan S.
    National Instrument
    s
    Applications Engineering

  • 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

  • Combining multiple WMI Queries for Single Step in Task Sequence?

    Hi there,
    since i couldn't find an answer on google i try to find the information here:
    i would like to use a multiple wmi query in a single step in task sequence.
    hat means i want to query fist if the Computer is a Laptop or not and then if yes, if it is from HP  Manufacturer.
    To find out if Machine is a Laptop i use the following wmi query:
    Select * from Win32_Battery WHERE (Batterystatus <> 0)
    To find out if the Machine is from Manufacturer HP i use the following wmi query:
    Select * from Win32_ComputerSystem WHERE Manufacturer LIKE "%HP%"
    my question: is it possible to combine those 2 queries?
    Like IF this is a Laptop AND IF it comes from HP, then install this type of software package?
    Thanks for your answers!

    unfortunely this did not work.
    i try to install specific software for all HP Laptops:
    but this software won't get installed on any HP Laptop. Message according to the logfile
    "The task sequence execution engine skipped an action because the condition was evaluated to be false"
    If i remove one of the WMI-Queries Installation works successfully.
    Can anyone point me what i might do wrong here?

  • How to combine several regex queries into a script?

    Hi there,
    is it possible to combine several regex queries into a javascipt? I export the text from a database with custom tags and the regex queries perform text AND character style replacements.
    example
    Let's say my exported text is the following
    "I have a <tag_bold>very big text</tag_bold> that includes a lot of different character styles, such as <tag_bold>bold</tag_bold>, <tag_italic>italic</tag_italic>, <tag_bold>bold with some <tag_bold_underline>underlined words</tag_bold_underline></tag_bold>,
    or ever words with different <tag_size-2>text size</tag_size-2>"
    The result I want is
    "I have a very big text that includes a lot of different character styles, such as bold, italic,
    bold with some underlined words, or ever words with different text size"
    Notice that all the tags open and close in the same paragraph and that there are nested tag pairs in some cases. So i execute my queries (more than 20) from the outer pair to the inner, that is:
    <tag_bold>...</tag_bold>
    <tag_italic>...</tag_italic>
    <tag_size-2>...</tag_size-2>
    <tag_bold_underline>...</tag_bold_underline>
    Thanks in advance for your help
    dps

    Hi Shonky,
    thank you for your answer. It seems that it is very close to the solution.
    1) I see now that my question was not clear enough.
    In the text that is included between the tags, I want to apply a Character Style I have define in the character style palette of InDesign CS3.
    That style can contain a lot of options, such as font family, size, style or color changes and is different for each tag.
    2) I tested the function with my tags:
    function my_replace (tag_bold)
    app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.findWhat = '<' + 'tag_bold' + '>' + '(.+?)</' + 'tag_bold' + '>';                     // here is the name i use in the regex tag
    app.changeGrepPreferences.changeTo = '$1';
    app.changeGrepPreferences.fontStyle = 'tag_bold';                                //here is the name of the Character Style I have define in InDesign
    app.activeDocument.changeGrep();
    app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences = NothingEnum.nothing;
    result: nothing happens
    3) Using in the script only the body of the function and running it, it highlights the right words with that pink color and shows that the Style of the text is "tag_bold", which is not available in the font family I use (Minion Pro).
    I think that the function needs a modification in the line "app.changeGrepPreferences.fontStyle = 'tag_bold';", especially the "fontStyle" attribute, but I don't know what it is. I'm not a javascript expert and maybe I don't know the right way to use this function with InDesign. I read some books about InDesign Scripting and Regular expressions, but  I didn't found all the answers I need as the one above or how I can run all the queries in one script (this is necessery because of the number and the order of scripts, to avoid mistakes).
    Thanks
    dps

  • 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 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...

  • 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

  • How to combine multiple Details section rows in my report

    Hello,
    I am currently creating a report which will display employee details, which includes first name, last name, home phone, cell phone and Email.
    I get my First Name and Last name from the "Employees" table but all other info is situated in the "CommunicationLinks" table.
    The tricky part which I am having issues with is the Home Phone, Cell Phone and Email are all under the same field in this table, the field is called "DisplayAs".
    These 2 tables are linked together by taking Employees.LinkID and linking it to CommunicationLinks.LinkIDParent, which are matching linkids.
    The only issue that I have, is for example, if you look at the screenshot provided, I have 5 details section that gets populated for the same employee.
    How can I combine all these 5 records to only one?
    The homephone, cellphone and email field have formulas created for them, the formula is as follow.
    This example below is for the HomePhone field, the others have different type assigned to them
    If {CommunicationLinks.Type} =1 then
    {CommunicationLinks.DisplayAs}
    else ""
    Homephone, Cellphone and Email are all different types but uses the same field "DisplayAs".
    I also tried creating a subreport for each of these fields but seems to give me the same results.
    Any help would be really appreciated.
    If you have any other questions please let me know. See attached screenshots for reference.
    Thank you in advanced.
    Jocelyn

    Easier way without working in SQL:
    1.  Group by a field that is unique to the employee.
    2.  Suppress the employee group header and the details sections.
    3.  Create a couple of formulas:
    {@ClearVariables}
    WhilePrintingRecords;
    StringVar HomePhone := "";
    StringVar CellPhone :="";
    StringVar Email := "";
    Put this formula in the employee group header - even though the section is suppressed, it will evaluate.
    {@SetVariables}
    WhilePrintingRecords;
    StringVar HomePhone;
    StringVar CellPhone;
    StringVar Email;
    if {CommunicationLinks.Type} =1 then
      HomePhone := {CommunicationLinks.DisplayAs};
    else if {CommunicationLinks.Type} = <type for cell> then
      CellPhone := {CommunicationLinks.DisplayAs};
    else if {CommunicationLinks.Type} = <type for email> then
      Email := "";
    Put this formula in the details section - it will evaluate even though the section is suppressed.
    {@HomePhone}
    WhilePrintingRecords;
    StringVar HomePhone
    (Do the same for Cell Phone and Email.  Note that there is no semi-colon at the end of this one!)
    Put these formulas and all of the rest of the employee data in one or more Employee group footer sections.
    -Dell

  • How to combine multiple pictures in one picture

    Hi guys.
    Total noob in photo shop here..
    I am very expert on using Paint (HAHA..) but using Photoshop 2014 is my very first time and only thing I know how to use is magic eraser..
    Right now I'm doing a website project and trying to make few pictures for each pages.
    I'm trying to make one picture that has multiple pictures inside. (with some designs.. and look smooth.)
    I have no idea how to use Photoshop and I just simple need to put pictures together to look nice and neat.
    I have attached two picture samples. It would be nice if you could teach me step by step how to make a pictures like that (would be awesome if its even better ^^)
    I appreciate your help and have a nice day.

    If you want to learn these kind of techniques there is a wealth of online tutorials that will help you work this out. Here are a few links that should point you in the right direction:
    Create collages, montages | Photoshop, Photoshop Elements
    Photoshop Tutorial : How to Make a Collage in Adobe Photoshop - YouTube
    All you need to do is search online and you should find most of what you want.
    Thanks

Maybe you are looking for

  • IPad2 is seen as a camera in Windows XP and not recognized

    I've been trying to sync my iPad2 to iTunes on my Windows XP work laptop.  I managed to get it to work before but for some reason it will no longer sync and is recognizing the iPad2 as a camera now rather than an iPad.  iTunes no longer sees the devi

  • Sending Mail with attachment from WD

    Hi all, I wan't to send an email from webdynpro with an attached pdf-document. I had a look at Tutorial 31, but i will only use the first part, sending email with attached interactive form. So I decided to build a new project. I did everything as in

  • Moving toward BI

    Hi professionals, I am working in a ALE/IDOC support project and I am an ABAP certified consultant. Now I am planning to take up BI. I have few doubts, 1. How is the job opening for an ABAP certified + BI certified person with 2+ years of experience

  • Blackberry World Not Functioning?????

    For the past couple of days, I have been unable to purchase apps. The page pops up that "the payment server/system is busy.....try the transaction later." This, of course, is not a problem. However, it has become very frustrating since it has gone on

  • Screen exit for invoice tab in me21n

    Hello, I have a requirment where i need to add push buttons at line item under the INVOICE TAB of transaction ME21N.Do we have a screen exit available for this? Thanks in advance, Suman Moderator message: please do some research yourself first. Edite