Link to home
Start Free TrialLog in
Avatar of Kornipalli
Kornipalli

asked on

Crosstab query using the DB2 stored procedure

Hi,

     I have a table called Problems with the following columns & data.


     Table Name: Problems

       Tkt#                       Problem_Code                Resolver_Group         Reporter_Group

     __________________________________________________________________________


    22                              Closed                           ABC                           Mechanical
    33                              Closed FC                      ABC                           IT
    11                              Resolved                        XYB                           Mechanical
    04                              Open                                                             IT
    99                              Closed FC                       XYB                          HR
    14                              Resolved                        PYT                           FI
    09                              Closed                           XYB                          HR

________________________________________________________________________________


I want to produce the Cross tab report with the following format :


Resolver_Group            Closed            ClosedFc      Total
________________________________________________________

ABC                                 1                   1               2
XYB                                 2                   1               3
PYT                                 1                   0               1

________________________________________________________

Criteria for producing the above ourptut:
____________________________________

Exlude Open Ticktes
CLOSED = Closed & Resolved Tickets
CLOSEDFC - Closed-FC ticketes
Total = Total number os Closed & Closed Fc tickets.

Please let me know the solution as soon as possible.

Thank You
Korni

Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Hi Kornipalli,

This is clearly a homework assignment and the rules disallow us providing homework.  Make a stab at it and we'll be glad to help you.


Good Luck!
Kent
ASKER CERTIFIED SOLUTION
Avatar of sachinwadhwa
sachinwadhwa
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kornipalli
Kornipalli

ASKER

Hi Kent,
    I am not undersatdning what you meant by the homework assignment & the meaning of a stab.
    I have tried to do it by Cube function, but could not able to do it.
    Please let me know.

Thanks
Kornipalli
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
use mine & kent's hint togeather and you will reach to answer quickly...
Hi Kent,
           Thank You for the response. It is not a Home assignment. I am a Fulltime employee & working on a project with the new tchnology IBM DB2.
           I have provided you the details just with general details.
           So, please let me know your soultion & it will be really a great help.
           I am also writing some code to test it out.

Thank You
Kornipalli

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial