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

DB2

Avatar of undefined
Last Comment
ocgstyles
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

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
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
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of sachinwadhwa
sachinwadhwa
Flag of United Kingdom of Great Britain and Northern Ireland image

use mine & kent's hint togeather and you will reach to answer quickly...
Avatar of Kornipalli
Kornipalli

ASKER

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
Avatar of ocgstyles
ocgstyles

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
DB2
DB2

IBM DB2 is a family of relational database server products developed by IBM that have been extended to support object-relational features and non-relational structures like JSON and XML. There are three main products in the DB2 family: DB2 for Linux, UNIX and Windows (informally known as DB2 LUW), DB2 for z/OS (mainframe), and DB2 for i (formerly OS/400), plus a version for IBM's Virtual Storage Extended (VSE) operating system.

6K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo