Combine three different cases

We want to display client information with order count basd on different status like Pending, Error, back Order, expedited, std shipping.
Output will look something like.
client name   pending    error   backorder   expedited   std shipping
ABC            24         0       674          6789         78900
XYZ            35         673    5700           0           798274
Is there any way I can combine these three into one query , only  problem I am having is there are 5 items for
order status. There are total 40 clients . The long running query are expedited and std shipping.
BEGIN
            SELECT count(*)
              INTO :ORDER_STATUS.PENDING
              FROM orders o
          WHERE o.status = 'P'
               AND (parent_order_id is null
                OR  (order_type='G'
                     AND parent_order_id=original_order_number))
                  AND  o.client = :ORDER_STATUS.CLIENT_NUMBER;
     EXCEPTION
       WHEN NO_DATA_FOUND
     THEN NULL;
       END;
         BEGIN
             SELECT  count(*)
               INTO  :ORDER_STATUS.ERROR
               FROM  orders o
              WHERE  o.status = 'E'
                AND  (parent_order_id is null
                 OR  (order_type='G'
                       AND parent_order_id=original_order_number))
                   AND  o.client = :ORDER_STATUS.CLIENT_NUMBER;
            EXCEPTION
       WHEN NO_DATA_FOUND
     THEN NULL;     
        END;
       BEGIN
            SELECT count(*)
              INTO :ORDER_STATUS.BACK_ORDER
              FROM orders o
          WHERE o.status = 'B'
               AND (parent_order_id is null
                OR (order_type='G'
                     AND parent_order_id=original_order_number))
                  AND o.client = :ORDER_STATUS.CLIENT_NUMBER;
      EXCEPTION
       WHEN NO_DATA_FOUND
     THEN NULL; 
     END;Thanks
sandy

BEGIN
            SELECT count(*)
              INTO :ORDER_STATUS.PENDING
              FROM orders o
          WHERE o.status = 'P'
               AND (parent_order_id is null
                OR  (order_type='G'
                     AND parent_order_id=original_order_number))
                  AND  o.client = :ORDER_STATUS.CLIENT_NUMBER;
     EXCEPTION
       WHEN NO_DATA_FOUND
     THEN NULL;
       END;
         BEGIN
             SELECT  count(*)
               INTO  :ORDER_STATUS.ERROR
               FROM  orders o
              WHERE  o.status = 'E'
                AND  (parent_order_id is null
                 OR  (order_type='G'
                       AND parent_order_id=original_order_number))
                   AND  o.client = :ORDER_STATUS.CLIENT_NUMBER;
            EXCEPTION
       WHEN NO_DATA_FOUND
     THEN NULL;     
        END;
       BEGIN
            SELECT count(*)
              INTO :ORDER_STATUS.BACK_ORDER
              FROM orders o
          WHERE o.status = 'B'
               AND (parent_order_id is null
                OR (order_type='G'
                     AND parent_order_id=original_order_number))
                  AND o.client = :ORDER_STATUS.CLIENT_NUMBER;
      EXCEPTION
       WHEN NO_DATA_FOUND
     THEN NULL;  Sorry .....Do you think this query will work as per my requirement?
Thanks
Sandy

Similar Messages

  • I cannot get Elemtnts 13.1 to download completely.  I have three different case numbers from Adobe and nothing helps.  I always get the "download failed" and the error code u44m1i210.

    I cannot get Elements 13.1 to download completely.  I have 3 different case numbers from Adobe and nothing helps.  I always get the "download failed" and the error code u44m1i210.  I would either like to get the product downloaded or eliminate the constant attempt which just ties up my computer.

    You could try the direct download links here
    Adobe Photoshop Elements 13 Direct Download Links, Premiere too | ProDesignTools
    And here is some info on that error code
    Error U44M1I210 | Install updates

  • How do I solve the problem downloading Elements 13.1?  I now have three different case numbers for Adobe and zero results.

    The download always fails with the error code U44M1I210 but it tries to download every time I use Elements.

    Hi kayemaych,
    Please make sure that the two files (.exe & .7z) files are inside the same folder & then try extracting again.
    if its still giving you issues then you may have to re download the .7z file.
    Thanks

  • How do I combine three itune accounts into one? Then have three different family member have three different log-in's to sync many different devices to the same itune account ?

    How do I combine three itune accounts into one? Then how do I set up three users for the one Itunes account on ONE Mac Pro Computer with one Itunes program? We are one family with 3 I-Phones, 2- I-Pads, 2- Lap tops and 3-I-Pods and would like to use one main computer to sync all our devices to.

    "How do I combine three itune accounts into one? "
    You cannot.
    "Then how do I set up three users for the one Itunes account on ONE Mac Pro Computer with one Itunes program?"
    You can copy all of the music to one computer and set up different users see:
    Learn how to set up additional user accounts.
    How to use multiple iPods, iPads, or iPhones with one computer

  • I combine 3 different invoices to create a single file,when it is done combining the files,all three invoices are the same,but i picked 3 different invoices,why does it do that?

    i combined 3 different invoices to create a single file,when the program is done combining the files it makes all the invoices the same,it does not have the other 2 invoices in it,makes 3 copies of the first invoice,why does it do that?

    I was having the same problem.  The trick is to flatten the forms before combining.  It is in the tools - print production menu.  If print production isn't there click on where I am indicating with the top blue arrow.

  • House Cleaning - Combining Three Existing Libraries Into One

    We have one existing iTunes account on our personal computer (Windows XP) and want to keep it that way but we want to do some housecleaning to maximize our iTunes/iPod experiences.
    XP allows us to have three different users (myself, my wife and our son), each user has their own iTunes Music Library again, all under one account - mine. We'd like to do the following and any help would be greatly appreciated.
    1. Combine all libraries into one (mine) and then everyone would go there for purchases, ripping CDs and synching and listening while we're at the computer.
    2. My wife has a first generation Shuffle and my son a first generation Mini that we'd like to clean out (reset I guess) and allow them to rebuild their own iPod libraries out of this new combined library that synch only when and to what they want them to.
    3. I'd like to add my own New iPod Nano that also would only synch only when and to what I want it to.
    Agian, any help resolving this would be greatly appreciated.
    Dell Dimension 4300   Windows XP  

    There isn't any way to combine multiple ITL files into one.
    I assume this is the case, you each have an ITL file in your Windows profile:
    http://support.apple.com/kb/HT1660
    But what you CAN do is consolidate each library to a shared folder.
    And either leave each other notes when you've bought new stuff, so it can get added to each library; or invest in some 3rd-party software like TuneRanger that can monitor the shared folder and add it to your library for you.
    You're probably still going to have to look through yourfiles to see what duplicates have been bought.
    I haven't shelled out the money for TuneRanger, but it looks iek it has some nice features.

  • Mixing Ram with different CAS latencies in K7n2 Delta-L?

    I have been using 512mb Kingston Value Ram in my computer, pc3200, with CAS latency of 3.0.   I just purchased some Corsair value select 512mb ram pc3200 with CAS latency of 2.5.   I know you are not supposed to mix ram with different speeds (like 400 vs. 333) but does it matter if the CAS latencies are different?  
    I'm running an AMD XP 1800+, K7n2 delta-L, nforce2 motherboard from MSI.  Someone at a computer shop told me they tried mixing Kingston 3.0 CAS with Corsair 2.5 CAS, and said his computer wouldn't even post.  So I'm wondering if this is an isolated problem, or you will always run into this problem if you mix ram with different CAS latencies.
        If anyone has experience with this issue, please share with the board.  Thanks!
    Chris

    The age old question, will the components I bought be compatible ? There are those that have bought identical matching memory that didn't work. In my case, I had an ECS K7S5A that used PC2100 Crucial memory, the sticks neither matched (at one time they did, but one stick died and they sent me the closest thing they had.). Neither of these Crucial sticks was identified by a configurator as being compatible with the K7N2 Delta L that I decided to buy. In the end, not only did both sticks work, but I put them in as single channel mode (ram slots 1 & 2), but later changed the configuration to dual channel mode (ram slots 1 & 3, even 2 & 3). It worked flawlessly in all three configurations. Sorry for the long answer, but in essence, there are no guarantees and your worries will drive you crazy. When memory is mixed, you reduce the likelihood of compatibility, even when you go beyond the recommended products that were specifically identified.
    That guy at the computer shop, did he ever indicate or isolate the true reason why the memory wouldn't work ? Maybe, maybe not. I would think with a disparity in memory, the bios is the key to setting the settings for the worst stick of the bunch. Then again, the products you get might overclock to what the better sticks run at. My assumption is that mixed sticks, the bios retards settings to this in "auto" mode. When you force it manually, it may work or it may fail. One thing you oughta know, each and every stick has the manufacturers id encoded onto them at the very least, just like the firmware on other items indicates a manufacturer code and other data that allows these things to be compatible. So know you face that battle going in with any of them. If the bios programming doesn't allow it to work, from that perspective, there'll be problems.

  • How do I use three different Iphones on one computer?

    I have three different iphones being used in one house. So far only one has ever been uploaded and saved to iTunes on the computer itself. I've been scared to do the other two devices in fear that somehow all of our apps will combine or be lost. None of us have the same apps or music. How do I go about adding the other two phones? PLEASE someone help.

    Have a read Here...
    https://discussions.apple.com/message/18409815?ac_cid=ha

  • How to print three different Barcodes in the same line

    I am trying to print Barcodes for three different fields in a single line, it is taking the combined one & printing only one barcode for  all those three fields.
       When I tested it by printing them in diff lines, it is working fine. But the requirement is to  print all fields in the same line

    Hi
    Look at this , may be useful
    To Create a Bar code prefix:
    1) Go to T-code - SPAD -> Full Administration -> Click on Device Type -> Double click the device for which you wish to create the print control -> Click on Print Control tab ->Click on change mode -> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -> save you changes , it will ask for request -> create request and save
    2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix
    Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.
    The place where you are using the field value use like this
    <C1> &itab-field& </C1>.
    You will get the field value in the form of barcode.
    Which barcode printer are you using ? Can you download this file and see.
    http://www.servopack.de/Files/HB/ZPLcommands.pdf.
    It will give an idea about barcode commands.
    Check this link:
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
    Hope this link ll be useful..
    http://help.sap.com/saphelp_nw04/helpdata/en/66/1b45c136639542a83663072a74a21c/content.htm
    go through these links and cose u r previous threads,
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    smartform - barcode
    http://www.erpgenie.com/abap/smartforms.htm
    http://sap.ittoolbox.com/groups/technical-functional/sap-basis/print-barcode-with-smartform-634396
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/printing-barcode-733550
    Detailed information about SAP Barcodes
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • I'm trying to install OEM SR 2.1: Windows 95B in Qemu...  How do I figure out which brand of CD-ROM drive Qemu emulates since I have three different drive specific boot disks...?

    I'm trying to install OEM SR 2.1: Windows 95B in Qemu...  How do I figure out which brand of CD-ROM drive Qemu emulates since I have three different drive specific boot disks...?

    Not exactly...; all MS produced Win9X/ME install CDs are ISO-9660 & maybe even Joliet too...  The really confusing part is that not all Windows 98 SE full install CDs are even bootable in the first place (they tend to only ship one if the PC is capable of booting directly from its optical drive...; the vast majority of PCs have to use the chain loading method due to buggy, poorly written, outdated BIOSes...; etc.).  OEM SR 2.1/Windows 95B is really quite special & innovative for its time in that it was the first Service Release of Windows 95 to support larger HDs via FAT32 which back then was still brand new: i.e.: exciting technology & it still has proven to be quite useful & versatile since most flash memory storage devices come pre-formatted FAT32.
    There's also a hidden X:\Usbsupp folder on the CD that contains the MS USB 1.1 supplement patches/upgrader: a common mis-nomer is that you don't need to install it unless your PC has USB 1.1 ports.  Even without USB 1.1 ports the upgrades to C:\Windows\system make it a lot less buggy, more secure & stable.  For anyone else that enjoys emulating OEM SR 2.1 there's also a great unofficial SP 1 for it which has so many useful patches in it I'm considering integrating it into all of my install CDs... 
    Unfortunately I've found that getting it to run decently requires tracking down a bevy of essential but according to MS's not releasing them in patch form optional DLL upgrades...  I guess not all machines are that unreliable but better to have them...; just in case you encounter a PC with a buggy BIOS that has hardware coniptions and/or ACPI/APM bugs.

  • Difficulty wiring three different arrays to one spreadsheet file

    I am having trouble outputting three different arrays from a case structure and sending them to an Excel file. I have read through several similar Excel threads and not seen anything really similar to my situation. I can't even get my arrays correctly wired to the "write to file" icon. Any suggestions would be great. I also attached my vi for reference.
    Thanks 
    Attachments:
    Read voltage, give current 5-29.vi ‏38 KB

    I cleaned it up a bit and fixed a few problems. It may not do everything that you want but I take no credit for the way the cose is written.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    Read voltage, give current 5-29.vi ‏24 KB

  • One merge instead of three different

    Hi all,
    My need is to calculate rows and write result into column:
    c1 if current month is 1st in quarter,
    c2 if current month is 2nd in quarter,
    c3 if current month is 3rd in quarter.
    For example, today is August, it's the second month in quarter, so I should write my value into c2 column.
    In my example below the result is just one row:
    select 111 as id, 1 as c1, 0 as c2, 0 as c3 from dualMy real result is much bigger, so I use merge to insert (is id is new) or to update (if id is already present in table).
    The question is how do I perform this using one merge instead of three different. In case it's possible at all, of course.
    CREATE TABLE marco_tmp_010811b
        (id                             NUMBER(9,0) PRIMARY KEY,
         c1                             NUMBER(15,0) NOT NULL,
         c2                             NUMBER(15,0) NOT NULL,
         c3                             NUMBER(6,0) NOT NULL);
    begin
    if months_between(trunc(sysdate+125,'MM'),trunc(sysdate+125,'Q')) = 0 then
    merge into marco_tmp_010811b rr
      using
      (select 111 as id, 1 as c1, 0 as c2, 0 as c3 from dual) hh
    on (hh.id = rr.id)
    when matched then update set rr.c1 = rr.c1 + hh.c1
    when not matched then insert (rr.id, rr.c1, rr.c2, rr.c3)
                          values (hh.id, hh.c1, hh.c2, hh.c3);
    end if;
    if months_between(trunc(sysdate+125,'MM'),trunc(sysdate+125,'Q')) = 1 then
    merge into marco_tmp_010811b rr
      using
      (select 111 as id, 0 as c1, 1 as c2, 0 as c3 from dual) hh
    on (hh.id = rr.id)
    when matched then update set rr.c2 = rr.c2 + hh.c2
    when not matched then insert (rr.id, rr.c1, rr.c2, rr.c3)
                          values (hh.id, hh.c1, hh.c2, hh.c3);
    end if;
    if months_between(trunc(sysdate+125,'MM'),trunc(sysdate+125,'Q')) = 2 then
    merge into marco_tmp_010811b rr
      using
      (select 111 as id, 0 as c1, 0 as c2, 1 as c3 from dual) hh
    on (hh.id = rr.id)
    when matched then update set rr.c3 = rr.c3 + hh.c3
    when not matched then insert (rr.id, rr.c1, rr.c2, rr.c3)
                          values (hh.id, hh.c1, hh.c2, hh.c3);
    end if;
    end;

    Can be also like this
    begin
         merge into marco_tmp_010811b rr
         using
              select
                   111 as id,
                   case when months_between(trunc(sysdate+125,'MM'),trunc(sysdate+125,'Q')) = 0 then 1 else 0 as c1,
                   case when months_between(trunc(sysdate+125,'MM'),trunc(sysdate+125,'Q')) = 1 then 1 else 0 as c2,
                   case when months_between(trunc(sysdate+125,'MM'),trunc(sysdate+125,'Q')) = 2 then 1 else 0 as c3
              from dual
         ) hh
         on (hh.id = rr.id)
         when matched then
         update set
              rr.c1 =
              CASE WHEN months_between(trunc(sysdate+125,'MM'),trunc(sysdate+125,'Q')) = 0 THEN rr.c1 + hh.c1 ELSE rr.c1 END,
              rr.c2 =
              CASE WHEN months_between(trunc(sysdate+125,'MM'),trunc(sysdate+125,'Q')) = 1 THEN rr.c2 + hh.c2 ELSE rr.c2 END,
              rr.c3 =
              CASE WHEN months_between(trunc(sysdate+125,'MM'),trunc(sysdate+125,'Q')) = 2 THEN rr.c3 + hh.c3 ELSE rr.c3 END
         when not matched then
              insert (rr.id, rr.c1, rr.c2, rr.c3)
              values (hh.id, hh.c1, hh.c2, hh.c3);     
    end;In different IF conditions, we have to make sure that other column value should not be changing,
    So in the else condition of CASE in the UPDATE section we will be using the current value of the column.
    Edited by: bpat on Aug 1, 2011 10:23 AM

  • Combining three Robocopy commands into one

    I would like to combine all three robocopy commands into one. <o:p></o:p>
    c:\windows\system32\robocopy.exe
    \\Source1 \\destination1*.*/mov /w:1 /r:1
    c:\windows\system32\robocopy.exe \\Source2
    \\destination2*.* /mov /w:1 /r:1
    c:\windows\system32\robocopy.exe \\Source3
    \\destination3*.* /mov /w:1 /r:1<o:p></o:p>
    Can someone tell me, if it possible or not. if yes, what will be that single Robocopy command.
    Thanks in advance

    If you have three different source and destination directories, you will need three separate commands.
    -- Bill Stewart [Bill_Stewart]

  • Bad bug with ID3 tags of different case for same artist

    My itunes files and music library are on a different drive than my boot drive. It is an internal drive (always on) in my Mac Pro at /Volumes/Media1/iTunes with music library at /Volumes/Media1/iTunes/iTunes Music. iTunes is setup to automatically keep it organized and copy files to the media folder when adding. It has been this way for years, never a problem.
    Just recently, and I think this may have coincided (but I'm not sure) with a 10.6.5 Snow Leopard update, my music started disappearing! The entries were still in the library, but with the missing exclamation mark in itunes with it reporting that it couldn't find the files. But only certain artists. After searching my computer, I found the missing files it at the same path, but on my boot drive, at /Media1/iTunes/iTunes Music/<missing artist>!
    Trying to add these files back to my library would work briefly, but then they would magically disappear out of /Volumes/Media1/iTunes/iTunes Music and go back to /Media1/iTunes/iTunes Music/
    I figured out the one thing the different artists that had this behavior had in common - some of the ID3 tags for the same artist, which are the basis for organization, were in different cases. I think there is a weird case sensitivity bug that is breaking things. When I add back only those songs for an artist with ID3 tags for the artist of the same case, the behaviour stops.
    I'm posting less looking for an answer and more to raise visibility and hope this gets a fix.
    Example entries from my iTunes Library.xml, notice how the 'k' in OutKast is a different case in the entries.
    <key>Artist</key><string>OutKast</string>
    <key>Location</key><string>file://localhost/Volumes/Media1/iTunes/iTunes%20Music/OutKast/Speakerboxxx,%20Th e%20Love%20Below%20(Disc%202)/13%20Pink%20&%20Blue.mp3</string>
    <key>Artist</key><string>Outkast</string>
    <key>Location</key><string>file://localhost/Volumes/Media1/iTunes/iTunes%20Music/Outkast/Aquemini/12%20Spot tieOttieDopaliscious.mp3</string>

    I'd like to note that I'm experiencing the exact same issue. I'd add to this but petegas4life has it spot on. I'm just replying in hopes this thread gets noticed so the engineers at apple can look into this and hopefully fix it in the next release.
    Reproducing the problem is pretty simple too. Just take one song from an album and change the case of the artist name. You'll see the music move to the boot drive and all of the songs from that artist won't work in itunes anymore. And if you're relying on iTunes to edit the tags, fixing the files is a PAIN because they keep disappearing on you.

  • I can't send emails from Mail. I have three different accounts set up and have the same problem with all. The mail just sits in my outbox. All worked fine until Yosemite upgrade. Recent update has not fixed problem.

    I can't send emails from Mail. I have three different accounts set up and have the same problem with all. The mail just sits in my outbox. All worked fine until Yosemite upgrade. Recent update has not fixed problem.

    I have been experiencing the same problem. My mail app won't even open on my Late 2011 Macbook Pro. It will show as open, but the app will never actually show up.

Maybe you are looking for