Group case

Hello

Maybe this could be something for LabVIEW 2014... ? Or 2015... ? Or maybe it already exists, but I don't know it yet?

I have a large structure with a structure of the event that triggers a State of many cases machine, I now have about 30 cases... It would be nice to consolidate some cases, so I have 4 cases associated with play and do pause for acquisition, which could be a group, then, I have a few other cases around 5 related to benchmarking, which could be a group.

I would be very convenient to push on the dropdown at the top of the structure of the case and that you could group business together, like a tree.

Best regards

Thijs

I would be very convenient to push on the dropdown at the top of the structure of the case and that you could group business together, like a tree.

As this?

Tags: NI Software

Similar Questions

  • How to include stmt cases in a group by clause

    Hi I have a question,

    How can I include a case statement in the group by clause?

    For example:

    Select
    (case when x.ctry is null then y.ctry to another x.ctry end) as chief operating officer.
    sum (x.in_amt)
    Of
    tbl1 x,
    TBL2 y
    where
    x.ID = y.id
    Group
    (case when x.ctry is null then y.ctry to another x.ctry end)

    Assume, I had millions of records in the tables, then my guess is, the above query could take huge time.

    Any other way to do it?

    CD / wrote:
    To delete the expression in the GROUP BY clause. I'm advocating no improvement in performance, I don't have?

    No, you didn't. And your advice can remove in fact the expression in the GROUP BY clause. But I am still confused as to why this would be an end in itself.

    Kind regards
    Rob.

  • ISE to affect strategies Group on SAA

    Anyone know if it's possible to use ISE to distribute on the SAA group policies based on the ad group, or user name?

    Hello Stephen,

    If I'm not mistaken you want to push the strategy of group name to configure the group-lock feature. Yes, this is possible based on the ad (subject). Please look at the screenshot attached of how you can set the ASA to the ISE group. The same group (case sensitive) must be predefined on the SAA to lock the user in the group to this specific group policy only.

    Once you are done with the authorization profile, create a rule to authz under policy elements > authorization > create a condition with the desired group and select the authorization profile thus created in the previous step.

    Kind regards

    Jatin kone

    * Make the rate of useful messages *.

  • Decode a Case statement to insert total text

    When the AGE GROUP fields are empty or Null, I need to insert text 'Total '? Can anyone help?

    Table
    -----------------------------------------------------------------------------------------

    SOURCE CODE AGE SUPPORT ACCOUNT
    CLUBBEN 0-40 years 3
    CLUBBEN 41 to 49 6
    CLUBBEN 50-59 years 38
    CLUBBEN 60-69 years 205
    CLUBBEN 70-79 years 181
    CLUBBEN 80 + years 19
    CLUBBEN 452
    41 to 49 2 CLUBJUNE
    CLUBJUNE 50-59 years 21
    CLUBJUNE 60-69 years old 100
    CLUBJUNE 80 + years 1
    CLUBJUNE 124
    TOTAL 576
    --------------------------------------------------------------------------------------------

    Script currently entered
    --------------------------------------------------------------------------------------------
    SELECT DECODE (GROUPING (F.SOURCE_CODE), 1, 'TOTAL', 0, F.SOURCE_CODE) in the "SOURCE CODE"
    CASE
    WHEN D.AGE BETWEEN '0' AND '40', THEN ' 0 - 40 years"
    WHEN D.AGE BETWEEN '41' AND '49' THEN 41-49 years
    WHEN D.AGE BETWEEN '50' AND '59' and THEN 50-59 years
    WHEN D.AGE '60' AND '69' and THEN 60-69 years
    WHEN D.AGE '70' TO '79' CAN 70-79 years
    WHEN D.AGE > = "80" AND "80s".
    ELSE "
    END AS "AGE GROUP."
    COUNT (F.MEMBER_COUNT) 'COUNT '.
    OF A3_FACT_NEW F, DIM_AGE D
    WHERE F.AGE_KEY = D.AGE
    "AND F.JOIN_DATE BETWEEN 25 JUNE 2012 ' AND 30 AUGUST 2012"
    AND F.BEN_TYPE = 'first Member '.
    AND F.SOURCE_CODE IN ('CLUBBEN', 'CLUBJUNE')
    GROUP BY ROLLUP (F.SOURCE_CODE,
    CASE
    WHEN D.AGE BETWEEN '0' AND '40', THEN ' 0 - 40 years"
    WHEN D.AGE BETWEEN '41' AND '49' THEN 41-49 years
    WHEN D.AGE BETWEEN '50' AND '59' and THEN 50-59 years
    WHEN D.AGE '60' AND '69' and THEN 60-69 years
    WHEN D.AGE '70' TO '79' CAN 70-79 years
    WHEN D.AGE > = "80" AND "80s".
    ELSE "
    END)
    ORDER BY (F.SOURCE_CODE), (2)
    --------------------------------------------------------------------------------------------------------------

    Try:

    SELECT
      DECODE(GROUPING(F.SOURCE_CODE),1,'TOTAL',0,F.SOURCE_CODE) AS "SOURCE CODE",
      DECODE(GROUPING(
        CASE
          WHEN D.AGE BETWEEN '0' AND '40'
          THEN '0-40 Years'
          WHEN D.AGE BETWEEN '41' AND '49'
          THEN '41-49 Years'
          WHEN D.AGE BETWEEN '50' AND '59'
          THEN '50-59 Years'
          WHEN D.AGE BETWEEN '60' AND '69'
          THEN '60-69 Years'
          WHEN D.AGE BETWEEN '70' AND '79'
          THEN '70-79 Years'
          WHEN D.AGE >= '80'
          THEN '80+ Years'
          ELSE ''
        END ),1,'TOTAL',
      CASE
        WHEN D.AGE BETWEEN '0' AND '40'
        THEN '0-40 Years'
        WHEN D.AGE BETWEEN '41' AND '49'
        THEN '41-49 Years'
        WHEN D.AGE BETWEEN '50' AND '59'
        THEN '50-59 Years'
        WHEN D.AGE BETWEEN '60' AND '69'
        THEN '60-69 Years'
        WHEN D.AGE BETWEEN '70' AND '79'
        THEN '70-79 Years'
        WHEN D.AGE >= '80'
        THEN '80+ Years'
        ELSE ''
      END) AS"AGE BRACKET",
      COUNT(F.MEMBER_COUNT) "COUNT"
    FROM
      A3_FACT_NEW F,
      DIM_AGE D
    WHERE
      F.AGE_KEY = D.AGE
    AND F.JOIN_DATE BETWEEN '25/JUNE/2012' AND '30/AUGUST/2012'
    AND F.BEN_TYPE     = 'Prime member'
    AND F.SOURCE_CODE IN ('CLUBBEN','CLUBJUNE')
    GROUP BY
      ROLLUP(F.SOURCE_CODE,
      CASE
        WHEN D.AGE BETWEEN '0' AND '40'
        THEN '0-40 Years'
        WHEN D.AGE BETWEEN '41' AND '49'
        THEN '41-49 Years'
        WHEN D.AGE BETWEEN '50' AND '59'
        THEN '50-59 Years'
        WHEN D.AGE BETWEEN '60' AND '69'
        THEN '60-69 Years'
        WHEN D.AGE BETWEEN '70' AND '79'
        THEN '70-79 Years'
        WHEN D.AGE >= '80'
        THEN '80+ Years'
        ELSE ''
      END)
    ORDER BY
      (F.SOURCE_CODE),
      (2)
    
  • request to clarify

    create table a (varchar2 (100)) State;

    insert into a values('a');
    insert into a values('b');
    insert into a values('c');

    I want the result form

    County status

    a            1

    <>has 2

    How can I get it

    Please post SQL/PLSQL all research related to SQL and PL/SQL space.

    Try:

    with t as)

    Select 'a' pass all the double union

    Select collar 'b' of all the double union

    Select 'c' double collar)

    Select case when col = 'a' then 'a' another '<>a ' end col, count (1)

    t

    Group case when col = 'a' then 'a' other '<>a ' end;

  • How to make a query faster

    Hi all

    I have almost the same query running in different databases. However, a database is display results faster than others. Please advise how I can improve performance.

    Original request: (counting the seconds 126,507)

    Select / * + parallel(ir,8) * /.

    -case when generic_text3 = "GBP" then "GBP" to another end 'USD' currency.

    sum (case when generic_text1 = 'Y' or ebook_flag = 'Y' or generic_text10 = 'Y' then 1 else 0 end) as digital_ct,

    sum (case when generic_text4 = 'Y' then 1 else 0 end) as nook_ct,

    Count (*) CT

    to ind_retail ir

    where VIRTUAL_TABLE_ID = 11236

    and import_ts between last_day (add_months (trunc (sysdate),-2)) + '1' INTERVAL DAY and last_day (add_months (trunc (sysdate),-1)) + '1'-DAY INTERVAL

    Group case when GENERIC_TEXT3 = "GBP" then "GBP" other end "USD";

    query must work on (counting the seconds 492,569)

    Select / * + PARALLEL (DHV, 16) * /.

    case when TEXT_0050 = "GBP" then "GBP" end "USD" another as CURRENCY - Currency Code - H

    SUM (case when TEXT_0270 = 'Y' or TEXT_0062 = 'Y' or TEXT_0375 = 'Y' then 1 else 0 end) as DIGITAL_CT, - Ebook Nook App flag flags and - video corner

    sum (case when TEXT_0025 = 'Y' then 1 else 0 end) as nook_ct,-flag Nook

    Count (*) CT

    Of

    CORE. DATA_HEADERS1_HIST

    where VIRTUAL_TABLE_ID = 11236

    and import_ts between last_day (add_months (trunc (sysdate),-2)) + '1' INTERVAL DAY and last_day (add_months (trunc (sysdate),-1)) + '1'-DAY INTERVAL

    Group case when TEXT_0050 = "GBP" then "GBP" other end "USD";

    The structure of the table are the same for both tables they have partition by virtual_table_id and index on import_ts.

    Thank you

    FB

    Sorry I had no access to explain plan. However, I tune up very well using the following sql indicator

    Select / * + FULL (DHV) PARALLEL (DHV, 8) * /.

    case when TEXT_0050 = "GBP" then "GBP" end "USD" another as CURRENCY - Currency Code - H

    SUM (case when TEXT_0270 = 'Y' or TEXT_0062 = 'Y' or TEXT_0375 = 'Y' then 1 else 0 end) as DIGITAL_CT, - Ebook Nook App flag flags and - video corner

    sum (case when TEXT_0025 = 'Y' then 1 else 0 end) as nook_ct,-flag Nook

    Count (*) CT

    Of

    CORE. DATA_HEADERS1_HIST

    where VIRTUAL_TABLE_ID = 11236

    and import_ts between last_day (add_months (trunc (sysdate),-2)) + '1' INTERVAL DAY and last_day (add_months (trunc (sysdate),-1)) + '1'-DAY INTERVAL

    Group case when TEXT_0050 = "GBP" then "GBP" other end "USD";

  • ADAM replication nonsense?

    Hello.

    I work at the Technical College with sites in 3 cities.  Each city is connected to other connection latency of 100 Mbps (think it's a triangle).  We organize voice over IP, video over IP and telepresence on these connections as well as web traffic, file & print, Oracle, etc.  Anyone who has the telepresence knows that if the Wan can handle this kind of traffic, this should not be a problem.

    Yesterday we had the visit of the EUC VMware experts to review our configuration and he mentioned that what we have is not supported because the replication of database ADAM.  I've never heard of this problem before and I wanted to get feedback from others who have used more time than I've ever seen.

    We set up a 5.1 environment seen last October where the main login server is in TOWN and we have installed a server connection in CITY B and CITY c.  He said that it is not taken in charge and VMware doesn't support us if we call them.

    His suggestion was to abandon it and install a separate view environment in each city.  Say what?  I do not mean that he is a liar, but I always double check the facts that seem suspicious.  This is a database of ADAM and has all the necessary tools for latency and disconnect WAN.  In addition, it is a connection of 100 Mbps, a T-1 or less.

    We have made this process so that each site has its own Server VDI and users do not go over the WAN.  Provides local access to VDI with centralized management.

    Thoughts?

    Karl Reischl wrote:

    ...  I do not mean that he is a liar...

    It's good to know.

    Documentation of the view is very clear on this point. Replicated instances of server connection groups are supported in a single datacenter connected LAN environment. It is mainly to do with the router traffic JMS Inter, not the AD LDS replication (previously known as ADAM).

    Check view Architecture Planning Guide. http://pubs.VMware.com/view-52/topic/com.VMware.ICbase/PDF/horizon-view-52-architecture-planning.PDF (page 47).

    ======================

    You can deploy multiple instances of server connection view replicated in a group to support load balancing
    and high availability. Groups of replicated instances are designed to withstand the grouping within a local network connected
    Single-data center environment.

    IMPORTANT VMware does not recommend or support using a group of the replicated view connection server
    instances across a WAN, MAN (metropolitan area network) or other non - LAN due to communication networks
    necessary traffic between the grouped cases. In scenarios where a deployment of view must extend over
    data centers, create a deployment of Horizon view separate for each data center.

    ======================

    Mark

  • On the graph and the trace of the 'other values '.

    Hi all.

    Currently using Apex 4.1

    Suppose you have a pie chart and want to just draw the first values of n, say the top 5 customers, and then group those remaining on a silce. Indicating that perhaps the rest are without interest to you. Group them under 'other '.

    Which is possible some graphics manipulation property or what I need to solve this problem on a query somehow...?

    Can someone give me a clue...?

    Thanks in advance...!

    It can be done in a query using rank().

    Basically classify you your groups and then do something like:

    Select
    cases where to classify<=5 then="">
    else 'other '.
    as the_groupings,
    Sum (mycounters),
    ...
    ...
    ...
    ...
    Group
    cases where to classify<=5 then="">
    else 'other '.

    Thus, myKey would be albums/clients/groups of names in the data, while the rest would be labeled as 'other '.

    Not sure of the syntax of details (I'm sure it will be difficult) but the method must be healthy.

    HTH,
    John

  • How can I know which page of a document are an external reference using ExtendScript?

    Hello

    I want to know on what page in an external document XRef can be found. Y at - it a simple way to manage this using ExtendScript? The FrameScript equivalent is XRef.Page.PageNumString.

    Thank you in advance.

    Here's the function changed, which now requires an object doc as the second parameter.

    function getPage (obj, doc) {
    
        var frame = 0, cell = 0;
        var objType = "", prop = 0;
    
        while (obj) {
    
            frame = obj;
            objType = obj.constructor.name;
    
            switch (objType) {
                case "SubCol" :
                    obj = obj.ParentTextFrame;
                    break;
                case "Tbl" :
                    obj = obj.FirstRowInTbl.FirstCellInRow;
                    break;
                case "Row" :
                    obj = obj.FirstCellInRow;
                    break;
                case "Cell" :
                case "Pgf" :
                case "AFrame" :
                    obj = obj.InTextFrame;
                    break;
                case "TextLine" :
                case "TextFrame" :
                case "UnanchoredFrame" :
                case "Arc" :
                case "Ellipse" :
                case "Group" :
                case "Inset" :
                case "Line" :
                case "Math" :
                case "Polygon" :
                case "Polyline" :
                case "Rectangle" :
                case "RoundRect" :
                    if (obj.FrameParent.ObjectValid()) {
                        obj = obj.FrameParent;
                    } else {
                        obj = 0;
                    }
                    break;
                case "XRef" :
                    prop = doc.GetTextPropVal (obj.TextRange.beg, Constants.FP_InTextObj);
                    var obj = prop.propVal.obj;
                    break;
                default:
                    // Prevent endless loop if unknown object type is found.
                    obj = 0;
                    break;
            }
        }
        if (frame) {
            return frame.PageFramePage;
        } else {
            return 0;
        }
    }
    
  • Separate vs Break Apart

    What is the difference between separating them and separate?

    [email protected] wrote:
    > What is the difference between separating them and separate?

    Separate can be applied only to the previously grouped cases and
    She essentially hold several things together as one.
    Apart from breaking it is an action real break which is irreversible.
    Converts things like plain text vector fills.

    --
    Best regards

    Urami

    --

    The beauty is in the eye of the beer holder...


    If you want to send me a message - DO NOT LAUGH at MY ADDRESS

  • Processing of the steps of 40 + "cases" manage subscriptions to e-mail group, desired look instead of single list column

    I am creating a custom subscription management page and have about 40 groups of emails I would like users to be able to manage their preferences on. I want to format e-mail groups box to check and be in more than one column instead of a long list.

    I am running into trouble. First, I brought in all the e-mail groups as single contact fields check box. This turns the page in a super long list of e-mail - not desirable groups. I can set up the processing steps so that it works to subscribe or unsubscribe to groups of e-mail users, however, I want to look more aesthetic where the e-mail group options would be in the columns.

    I am wanting a solution for the boxes of the e-mail group to fall into the columns. However, when I use the approach of adding a custom field group > > column three custom > > then download a list of all the e-mail groups, can't do the processing steps allowing subscribes and cancels his subscription. In the steps of treatment, that it looks like the entire entity boxes wants to correspond with the group just email. I need the solution allowing each group of e-mail under the boxes to be able to map to a different electronic group at Eloqua and SFDC.

    Can someone help me?

    I want to be able to have my email subscription group text boxes in a list of multi-coloumn aesthetic, instead of one single long list. It is essential that the solution still allows processing steps to unsubscribe or subscribe users to this group of specific coordination with the box e-mail they either checked or disabled.

    Here, the answer is in the code.  What you need to do is to use CSS to create fake columns in your layout.  So what you need is a container wrapped around your input box element (and label).  The necessary code is likely to vary, but the example of bootstrap below is a good reference to highlight the code.  In this case, the container with a 'field-group' class is used to contain the entire box input element.


      
      
     

    In this example, the form-group class is what you want to style.  In the CSS, you will need to use the following text:

    . Form-group {width: 33%; float: left ;}}

    This style will cause the width of the form group confined to a fixed width of 33% and the left float attribute will allow the element to be removed from the flow of the document and create a type column in your page look.

  • Group By with Case statement

    Hello

    I have a question I want to return a different group of list depending on a variable of common past in? It sounds easy, but I can't understand it >

    Example 1 if the: P380_COURIER_TYPE = 'All' I want the group by being 'group by tour' - a single column

    Example 2 If the: P380_COURIER_TYPE <>'All' I wish that the group by to "group by tour, exp_del_channel '--2 columns

    Select

    Tour as a 'Tour '.

    Exp_del_channel as 'Courier Type' - it can be removed from the select statement because it is not necessary in the report.

    , sum (pan_only) "Pan" only

    Of

    VW_VOLUME_PREADVICE_REPORT APV

    where (: P380_COURIER_TYPE = 'All' or exp_del_channel =: P380_COURIER_TYPE)

    Touring band, exp_del_channel

    not tested

    select
    Tour as "Tour"
    ,nvl(case when :P380_COURIER_TYPE<>'ALL' then exp_del_channel end,'ALL') as "Courier Type"   -- this can be removed from the select statement as it is not required in the report.
    ,sum(pan_only) as "Pan Only"
    from
    VW_VOLUME_PREADVICE_REPORT vpa
    where (:P380_COURIER_TYPE ='All' or exp_del_channel =:P380_COURIER_TYPE)
    group by tour, case when :P380_COURIER_TYPE<>'ALL' then exp_del_channel end
    
  • I have a question in groups to help decode and case in pl/sql

    my request is something like this but with more column in select. When I shot this request it gives result but it's not good

    My problem is, as if there are more than 3 values for uh.sflowtype (0,1,2) then group by does not work for them and those coming in different line, I need them to be combined

    query is:
    Select substr (uh.sstartdatetime, 1, 8) DateTime,
    (case
    When uh.sflowtype = 7 then "sms".
    When uh.sflowtype = 9 then 'mms'
    When uh.sflowtype = 10 then "gprs".
    another "voice".
    end)
    as e_vpn_usagehistory flowtype UH where 1 = 1 and uh.nspid = '1' AND ((substr (uh.sstartdatetime, 1, 8) > = 20130507))
    AND (substr (uh.sstartdatetime, 1, 8) < = 20130606)) GROUP BY substr (uh.sstartdatetime, 1, 8), uh.sflowtype
    substr(uh.sstartdatetime,1,8) DESC order


    result:

    DATETIME FLOWTYPE
    -------- --------
    20130507 voice
    20130507 voice
    20130507 voice
    20130507 sms
    20130507 mms


    but I need

    20130507 voice
    20130507 sms
    20130507 mms

    so, what should I do?
    Please suggest me
    select  to_char(uh.sstartdatetime,'DD-MON-YY') DateTime
    ,       ( case when uh.sflowtype=7 then 'sms'
              when uh.sflowtype=9 then 'mms'
              when uh.sflowtype=10 then 'gprs'
              else 'voice'
              end ) as flowtype
    from   e_vpn_usagehistory uh
    where uh.nspid='1'
    AND   ((substr(uh.sstartdatetime,1,8) >= 20130507 )
    AND   (substr(uh.sstartdatetime,1,8) <= 20130606))
    GROUP BY to_char(uh.sstartdatetime,'DD-MON-YY'),
              ( case
             when uh.sflowtype=7 then 'sms'
            when uh.sflowtype=9 then 'mms'
            when uh.sflowtype=10 then 'gprs'
            else 'voice' end )
    order by to_char(uh.sstartdatetime,'DD-MON-YY') DESC
    

    Try this.

    If it doesn't work thanks for posting data.

    p.s. Your order will be not that useful as a varchar either

  • Cases in the Group of cluses

    I need to group of cases with sub query is possible
    /*******************************************************************************/
    Select
    segment3,

    (case when segment3 as 210% ' and segment4 in (select child_m from apps.) XXNBE_PAR_PROD) and then (select parent_m from apps. (XXNBE_PAR_PROD where segment4 = child_m) else ' ' end) AS PC,.

    Sum (br_egp) IN_BR_EGP

    from apps. XXNBE_FIN_R7 R7

    Group

    segment3

    , (case when segment3 as 210% ' and segment4 in (select child_m from apps.) XXNBE_PAR_PROD) and then (select parent_m from apps. (XXNBE_PAR_PROD where segment4 = child_m) else ' ' end);

    /*******************************************************************************/
    It is not not allowed here to Returne the error subquery expressions

    You cannot use subqueries in Group of. Try this

    
    select a.segment3,
           case when a.segment3 like '210%' and
                     b.child_m is not null
                then b.parent_m
        else ' '
           end as pc
      from app.XXNBE_FIN_R7 a
      left
      join apps.XXNBE_PAR_PROD b
        on a.segement4 = b.child_m
    group
        by a.segment3,
           case when a.segment3 like '210%' and
                     b.child_m is not null
                then b.parent_m
        else ' '
           end 
    
  • NEED HELP IN THE GROUP BY CLAUSE CASES PLEASE

    User1983440 thanks for the help with the script below grouped by product category, can you or someone else help me group by another Case statement as well.


    WITH p AS)
    Select distinct
    partner, region, od. ORDER_AFFILIATE_NAME,
    Oh.external_order_number,
    Ain.get_g1 (queue_type) offers,
    Case
    When disp.category = 100 Then 'ORDER'
    When disp.category = 200 Then 'ACCESS'
    When disp.category = 300 Then 'DSL'
    When disp.category = 600 Then 'IPTV'
    "When disp.category = 700 Then'INTERNET"
    When disp.category = 800 Then 'VOIP'
    End up like product_category,
    To_char(OH.created_ts, 'yyyy-mm-dd HH24:mi:ss') CREATE_DATE
    -Case when ip.offer_type = "IPDSLAM" or instr (ip.display_name, "-d") > 0
    THEN 'IP - LAN'
    ELSE 'FTTN.
    end as product_type
    Case
    When disp.state = 4 and disp.state = 9 or disp.state = 21 or 22 = disp.state then 'cancelled '.
    When disp.state = 17 then "NRFC cancelled.
    When disp.state = 7 Then 'incomplete '.
    When disp.state = 3 or disp.state = 8, then "Finish".
    When disp.state = 6 or disp.state = 10 and disp.state = 13 or disp.state = 14 then 'pending - other ".
    When disp.state = 19 disp.state = 20 then "sent".
    When disp.state = 21 or disp.state = 22 then "Cancelled - CSUS.
    When disp.state = 23 or 24 = disp.state then 'Order Confirmation '.
    When disp.state = 1 or disp.state = 2 or disp.state = 15 then "receipt".
    Another 'other '.
    End as STATE_desc
    of AIN.impl_oh_order_header oh,.
    Ain.impl_order_data od,
    DISP AIN.sncr_order_curr_disp,
    AIN.impl_package ip
    where oh.created_ts between to_date ('2013-02-04', ' yyyy-mm-dd "")
    and to_date ('2013-02-11', ' yyyy-mm-dd "")
    and oh.order_type = 'COMMAND '.
    and disp.category to (200, 300, 600, 700, 800)
    and disp.state! = '5'
    and uscs = 0
    and disp.transaction_id = oh.transaction_id
    and od. transaction_id = oh.transaction_id
    and ip.transaction_id = oh.transaction_id
    and ip.package_type = 'PACKAGE '.
    and ip.parent_package_id is null
    and ip.product_type = 'COMMAND '.
    )
    SELECT product_category,
    COUNT (*)
    P
    GROUP BY product_category

    To summarize, by category of product, and then by state_desc:

    WITH p AS (
    Select distinct
    partner, region, od.ORDER_AFFILIATE_NAME,
    oh.external_order_number,
    ain.get_g1(queue_type) offer,
    Case
    When disp.category = 100 Then'ORDER'
    When disp.category = 200 Then'ACCESS'
    When disp.category = 300 Then'DSL'
    When disp.category = 600 Then'IPTV'
    When disp.category = 700 Then'INTERNET'
    When disp.category = 800 Then'VOIP'
    End as product_category,
    TO_CHAR(oh.created_ts, 'yyyy-mm-dd hh24:mi:ss') CREATE_DATE,
    Case when ip.offer_type = 'IPDSLAM' or instr(ip.display_name, '- D')> 0
    THEN 'IP-DSL'
    ELSE 'FTTN'
    end as product_type,
    Case
    When disp.state = 4 or disp.state = 9 or disp.state= 21 or disp.state= 22 Then 'Canceled'
    When disp.state = 17 Then 'Canceled NRFC'
    When disp.state = 7 Then 'Incomplete'
    When disp.state = 3 or disp.state = 8 Then 'Complete'
    When disp.state = 6 or disp.state = 10 or disp.state = 13 or disp.state =14 Then 'Pending - Other'
    When disp.state = 19 or disp.state = 20 Then 'Submitted'
    when disp.state = 21 or disp.state = 22 then 'Cancelled- CSUS'
    when disp.state =23 or disp.state = 24 then 'Order Confirmation'
    when disp.state =1 or disp.state = 2 or disp.state = 15 then 'Received'
    Else 'Other'
    End as STATE_desc
    from AIN.impl_oh_order_header oh,
    ain.impl_order_data od,
    AIN.sncr_order_curr_disp disp ,
    AIN.impl_package ip
    where oh.created_ts between to_date('2013-02-04', 'yyyy-mm-dd')
    and to_date('2013-02-11', 'yyyy-mm-dd')
    and oh.order_type = 'ORDER'
    and disp.category in (200, 300, 600, 700, 800)
    and disp.state !='5'
    and uscs= 0
    and disp.transaction_id = oh.transaction_id
    and od. transaction_id = oh.transaction_id
    and ip.transaction_id = oh.transaction_id
    and ip.package_type = 'PACKAGE'
    and ip.parent_package_id is null
    and ip.product_type = 'ORDER'
    )
    SELECT product_category, STATE_desc,
    COUNT(*)
    FROM p
    GROUP BY product_category, STATE_desc
    

    To summarize by state_desc, just remove "product category", the query above.

Maybe you are looking for

  • Quickly convert a length (m * n) table 1 d an m by n matrix 2D

    Hi all I'm looking for a way to speed up a particular step in a VI that I use. I have a table 1 d of length m * n I want to convert to a table 2d of dimensions m and n. currently I feed the table 1 d in a loop and use split 1 table d to cut the table

  • Changes to parameters scale always print

    I recently had a hard drive crash and now when I print web pages, the settings are set automatically to 100% and printing off captures all the data.  I'll have to go every time I have print and reset the settings to 70% in order to capture the entire

  • Fonts in Outlook Express

    I'm trying to define Outlook Express is to always dial 14 pt Comic Sans MS. I'm going to compose and set and save but when I compose, he goes to Arial 10 pt. Y at - it something I am doing wrong?

  • I use google chrome. It is redirected to Yahoo.

    I use google chrome but it is redirected to Yahoo. Any ideas?

  • Stability of the platform

    Man restarts spontainously from sleep mode after about 30 sec.also E-mail stops working after 5 min.