If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Cube and Rollup in iseries db2?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-09-04, 16:13
saikrishna_dv saikrishna_dv is offline
Registered User
 
Join Date: May 2003
Posts: 23
Cube and Rollup in iseries db2?

Friends,
I am trying to display subtotals from a table located in iseries db2 through an ASP.NET based web application. If I could have used CUBE and ROLLUP
statements the query would have been very easy but after reading this article
(http://www-919.ibm.com/servers/eserv...i/bipaper.html)
I am assuming that both RollUp and CUBE are not supported on iseries db2 yet(please correct me if I am wrong).
Can any one of you direct me the best way of displaying subtotals without using CUBE and ROLLUPs?

sample Table
------------
Product Warehouse Location QTY
P1 W1 L1 1
P2 W1 L1 3
P2 W1 L2 2
P1 W2 L1 3
P3 W2 L1 5
P2 W2 L2 4

and I want the result table in the following format, it should be grouped by (Warehouse and location)
-----------------------------------------------
Product Warehouse Location QTY
P1 W1 L1 1
P2 W1 L1 3
NULL NULL NULL 4
P2 W1 L2 2
NULL NULL NULL 2
P1 W2 L1 3
P3 W2 L1 5
NULL NULL NULL 8
P2 W2 L2 4
NULL NULL NULL 4

Any input is highly appreciated.

Thanks,
Sai
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On