How can I combine two queries ? QoQ does not work

I have one query where I just count the total qty coming in per month, something like:
<cfquery name="qryIn" datasource="dbname">
select count(orderNO) as totalIN,month
where status = "IN"
group by month
</cfquery>
I then have a second query to count the total qty going out per month
<cfquery name="qryOut" datasource="dbname">
select count(orderNO) as totalOut,month
where status = "OUT"
group by month
</cfquery>
I then use QoQ to combine both:
<cfquery="qryTotal" dbtype="query">
select
totalIN,
totalOUT
from qryIN,qryOUT
where qryIN.month = qryOUT.month
</cfquery>
The problem I am running into is that QoQ does not allow LEFT JOIN, so that if the month is in one query but not the other, it will not pick up that record. And that is throwing off my counts.
How can I combine  both queries, and bypass QoQ to get a qty IN and qty Out value, per month ? and, for example, if qty in exists for one month and qty Out does not exists for that month, then qty Out will be zero for that month.
I need this data to plot a chart.
Thanks for any help provided.

Do it in a single query to your database.  Here is part of it.
select month
, sum(case when when status = "IN" then 1 else 0 end) total_in

Similar Messages

  • How can play Itune song when authoriaztion does not work?

    after sharing Itune file, how can I play song when computer authorization process does not work?

    Hi dewhi,
    You can use the Adobe Cleaner Tool to uninstall CS6.
    You can download the cleaner from : http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html

  • How can I download firefox 4 - 5 does not work with google toolbar

    I really dislike latest version of Firefox. I want the old version. How can I get it back!

    Google Toolbar [https://support.mozilla.com/kb/Add-ons%20are%20disabled%20after%20updating%20Firefox Add-ons are disabled after updating Firefox]
    * GBookmarks (Google Bookmarks for Firefox) 25.6KB<br>https://addons.mozilla.org/firefox/addon/gbookmarks-google-bookmarks-fo/
    * http://kb.mozillazine.org/Problematic_extensions
    *for a Google Toolbar solution see https://support.mozilla.com/questions/837473

  • How can I combine two itunes accounts into one?

    How can I combine two itunes accounts into one?

    Items purchased from the iTunes Store are permanently associated with the account from which they were originally purchased.  Apple provides no way to change this.
    However, if you wish to put content from two accounts into a single iTunes library, you can easily do so.  Use the command File > Add File (or Folder) to Library.

  • How can I combine two databases, from two computers, to have one combined database of messages?

    My old XP computer recently died and I had to build a new Windows 8.1 machine. While I was down I used a laptop as a temporary replacement. Now my new machine is running fine and receiving e-mail, but I now have two databases--one on the new machine and one on the laptop. Both are based on a recent backup, so they are lengthy--except that the new machine's database has a hole in it for the period I was on the laptop and the laptop's database also has gaps. How can I combine two databases into one that includes the messages from both machines?
    Thanks in advance,
    profsimonie

    Thanks for your reply. My profile folder did not contain any MBOX files. I found them in another folder on another drive. The Import-Export tools simply transferred each folder to the current one as a sub-folder. Then I had to use ctrl-a to select everything in the folder and move them manually to the current folder (such as inbox). Then I could use the other utility you mentioned to remove the duplicates. This had to be done, one folder at a time, to combine each folder. It worked, but I had about thirty-five folders to deal with. The whole process took most of two days to complete. I wish there was a simple way to blend everything together in one action, but I could not find an add-on that would do this.
    Frank Simonie

  • Hi, I Would like to know what I need to do to make work iWork"09 with my portable which has mac OS Lion 10.7.5 ; it does non open it because it says I need to do some updates but how can I do it if it does not open it ?

    Hi,
    I Would like to know what I need to do to make work iWork"09 with my portable which has mac OS Lion 10.7.5 ; it does non open it because it says I need to do some updates but how can I do it if it does not open it ?
    Thank You

    WILL ANYONE ANSWER MY QUESTION?  WHAT DO I HAVE TO DO TO GET A REPLY FOR MY CONUNDRUM/

  • Two finger scrolling does not work on my MacBook (late 2008)

    Two finger scrolling does not work on my MacBook (late 2008) with either the notebook trackpad or a b/t conected magic trackpad.  Yes, I've set system preferences.  Suspect a driver or s/w problem.  Ideas?

    Saw another post that hinted that you need to go to accessibility settings:
    System Preferences > UniversalAccess > Mouse & Trackpad > Trackpad Options
    Enable scrolling (and I enabled dragging while I was at it and it worked.  Looks like wierd things can get set even if you don't mean it to.

  • I am having trouble with my iPad, i can start it, but the iPad does not work. i tried to use the power and home button at the same time, the apple logo appears, but the iPad does not work. What am I suppose to do?

    I am having trouble with my iPad, i can start it, but the iPad does not work. i tried to use the power and home button at the same time, the apple logo appears, but the iPad does not work. What am I suppose to do?

    After the Apple logo appears, what happens then? Can you hear any sounds or if you tap on the screen, does it seem like apps can open or are you just seeing a black screen? You might have a hardware problem, but you can try restoring the software and see what happens.
    Read this in its entirety before you do anything. Make sure you read the sections at the end about using recovery mode.
    iTunes: Restoring iOS software - Support - Apple

  • MB Air two finger scroll does not work for a user but does for another

    Hi
    MB Air. 10.9.3.
    Defective Trackpad was just replaced. Two finger scroll does not work for the main user. I made a test log in and two finger scroll works. I booted off an external drive and two finger scroll works.
    I pulled all of the user preferences out, logged out and in and still does not work. Zapped PRAM. Checked all trackpad settings. No luck.
    Tried this in Terminal:
    defaults write -g com.apple.trackpad.scrollBehavior 2
    Any ideas?

    This sounds strange but check the settings in Settings>Accessability for the track pad. I belive your problem lies there not in Track Pad set up in Settings.

  • How can I combine two XDOXSLT functions?

    Hi all,
    I would like to combine two xdoxslt functions:
    <?xdoxslt:get_variable($_XDOCTX, 'minYear')?>
    with
    <?xdoxslt:get_day(‘2000-04-08’, $_XDOLOCALE)?>
    instead of 2000-04-08 I wrote this:
    <?xdoxslt:get_day(‘xdoxslt:get_variable($_XDOCTX, 'minYear')’, $_XDOLOCALE)?>
    but it doesn't work or the syntax is not accepted. Does someone know, how can I build that with XDOXSLT, please not XDOXF or something like that...
    thanks in advance
    Regards

    <?xdoxslt:get_day(‘2000-04-08’, $_XDOLOCALE)?>
    Set <?xdoxslt:set_variable($_XDOCTX, 'minYear', ‘2000-04-08’)?>
    Get <?xdoxslt:get_day(xdoxslt:get_variable($_XDOCTX, 'minYear'), $_XDOLOCALE)?>You can nest the xdoxslt functions.
    just make sure, you don't make them as string , .. don't pass them in single or double quotes.

  • How can I combine two iTunes accounts?

    I had an iTunes account at home then created another at work. How can I combine the two? 
    When I received an iPad2 at work, I was required to have/initiate an account during the setup process.  I couldn't remember what email address my personal iTunes account was under, so I set up another and began using it to load required and desired apps on my iPad.  Openning my windows laptop for the first time in months, I now see that my personal iTunes account was under a really old email address (which is why I couldn't recall it at work).
    The (old) personal account has many podcasts and personal music, yet the new iPad account is linked to my work apps.  Is it possible to merge the two?

    Hi vwalker,
    I have the same issue, but it seems that Apple will not let you merge itunes accounts.  Refer to this FAQ, specifically the text below:
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    If you are wondering how using multiple Apple IDs relate to iCloud, see Apple IDs and iCloud.
    This is the original website: http://support.apple.com/kb/he37
    Now I have to add that this is rather disappointing as I have some purchases on my old itunes account which I would like to merge into my current iTunes account (which was created due to an oversight).  The oversight was, I thought my original iTunes was converted to @me.com one when I signed up for the 90 day trial to use mobileme services.

  • How can I combine two iPhoto albums?

    How can I combine several IPhoto albums?

    Select the photos in Album B and drag them onto Album A in the side pane that will put them in that album.  Do the same for Album B, and C, etc. 
    OT

  • How can I create a template that does not have automatic formatting but my own?

    I have just switch to a Mac from a PC and am having a terrible time with pages.  All I want to do is create my own template that has NO AUTOMATIC FORMATTING so I can do my own.
    There is nothing in the HELP sections on how to delete the automatic formatting.  I do not want to use any of their Outline Templates just make up my own.
    I would be so so grateful if someone could help me with this.  I took a one-on-one and his idea of how to get rid of formatting in my own template DID NOT WORK!
    Thanks, Deborah

    Deborah
    Hard to see your problem, and if there is something THAT DOES NOT WORK! it would obviously be useful to know WHAT that is and WHY you believe it does not work, so we can ACTUALLY RECOMMEND A SOLUTION.
    Just select any text and change it to whatever you want using the toolbar and/or the Text inspector.
    The Outlines are just a view of your text, in a form that lets you easily organise and move it around.
    Menu > View > Show Styles Drawer
    Reveals whatever style has been applied to a heading or text and you can update or create new styles by clicking on the small triangle next to it > Redefine style from selection
    When you are finished just save it as a Template.
    Peter

  • How can I have two differents versions of provider working in a Server

    Hi... I'm a ASP Classic developer. I'm working with Oracle 10g and I'm using the Oracle Provider 10.1 but now I need to change of version to 10.2 Release. So I install the 10.2 Release Version in same host where I have de 10.1 version.
    For do the connection to Oracle 10g DB I do something like this:
    Connection.asp -->
    <%
         Set Cn = Server.CreateObject("ADODB.Connection")
         Cn.Open "Provider=OraOleDB.Oracle; Data Source=DBTest; User ID=Test; Password=Test;"
    %>
    I have to Tnsnames.ora files (one for 10.1 and other for 10.2 Release). I this 2 files I descrive de Oracle Service Named DBTest like this:
    C:\oracle\product\10.1.0\Client_1\network\ADMIN\tnsnames.ora
    -->
    DBTEST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.10)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = DBtest)
    C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN\tnsnames.ora
    -->
    DBTEST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.10)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = DBtest)
    However when I try to connect to DB I got the next exception:
    OraOLEDB (0x80004005)
    ORA-12154: TNS:could not resolve the connect identifier specified
    Two cuestion:
    --> Can I have two versions or Oracle Provider working in a server???
    --> How can I specify to ASP page the Oracle Provider than must to use???
    Tks 4 help

    I'm not an ASP developer, but if you are able to set $ORACLE_HOME environment variable through ASP you can then switch providers..

  • Two finger scrolling does not work on Synaptics touchpad + clicking problems in web browsers

    Hello,  Since yesterday, i have problems with my synaptics touchpad on my HP Elitebook 8570w.The two finger scrolling and scrolling at the edge of the pad does not work.Also in google Chrome, all the links open in a new tab and when i try to click the new tab, it closes (normally that is the action when i click it with the middle touchpad button) Even in the practice mode of the synaptics settings of the touchpad, the two finger scrolling and edge scrolling does not work. Both options are enabled in the settings. I already tried to roll back the driver and reinstall the driver, without any effect.I expect the problem is the touchpad or the buttons itself. Is there a way to test the buttons and touch pad? How can i solve this problem?  please help me  sincerely, Karel 

    I would try installing the Windows 8.1 (64-bit)  Synaptics touchpad driver available in your sleekbook's web support download section before using compatibility mode.  Try the available earlier versions if the current driver does not work for you. 
    If you still do not have positive results, then use compatibility mode (choose Windows 8) on all three Windows 8.1 synaptics touchpad drivers, starting with the most current one.
    To use compatibility mode to install the driver softpaq just right click on the file and choose troubleshoot compatibility. Choose Windows 8 and run the installer.
    The following video has a decent explanation, but the narrator does not get to the point for a bit. Skip forward to minute 4  and watch it from there.
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

Maybe you are looking for

  • How do i reset an iPad to factory settings without knowing the passcode?

    We laid off an employee but don't have his passcode to reset the ipad to it's factory settings.  Is there anyway I can do this?  I tried following the directions I found: If you don't know the passcode to go into the ipad and reset it, you simply nee

  • CS5 Production Premium - Student. Upgrade to CS5.5?

    Thanks for reading all of this: I recently purchased CS5 Production Premium Student Edition. Adobe sent me an email saying I'm eligible for a complimentary upgrade. I sent in the request, and another email then said "When CS5.5 is available, we will

  • Thread: Could not generate the XML in single thread mode

    Hi all, I have created a report using PLSQL Procedure method after submitting the request I am getting the following Error.Couldn't sort out why I am getting the error while running the report. Error in "Multi threaded or single threaded execution bl

  • Creation of Invoice

    Dear Friends, I need your help for the following scenario. I want to create a invoice like proforma invoice. eg I am having a sale order for 50 Tones.I want to take 50 % advance from the customer.Hence I want to create invoice only for these 50 %.How

  • ITunes won´t open: because "secured Volume or no rights!"

    Something went wrong with iTunes on my MacBook, and though I´ve trashed and downloaded anew, it won´t open. It claims "iTunes is on a secured Volume or I have no access rights" (Finder Information shows I have the rights). Copying from the iMac did´n