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 > syntax for materialised query table with create as select

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-28-06, 04:22
rajesh438 rajesh438 is offline
Registered User
 
Join Date: Sep 2006
Posts: 12
Lightbulb syntax for materialised query table with create as select

please send me example query that creates a materialised query table using "group by"(fetch first n rows only)
Reply With Quote
  #2 (permalink)  
Old 09-28-06, 05:00
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
i am also studing MQT so i thought
following articles may be of great help to u

http://www-128.ibm.com/developerwork...nyk/index.html

http://www-128.ibm.com/developerwork...kuznetsov.html

CREATE TABLE DB2INST2.SUMMARY_CUSTOMER_ORDER_2001 AS
(SELECT SUM(AMOUNT) AS TOTAL_SUM,
TRANS_DT,
STATUS
FROM DB2INST2.CUSTOMER_ORDER
WHERE TRANS_DT BETWEEN '1/1/2001' AND '12/31/2001'
GROUP BY TRANS_DT,
STATUS)
DATA INITIALLY DEFERRED REFRESH DEFERRED;

REFRESH TABLE DB2INST2.SUMMARY_CUSTOMER_ORDER_2001 ;
Reply With Quote
  #3 (permalink)  
Old 10-03-06, 04:32
rajesh438 rajesh438 is offline
Registered User
 
Join Date: Sep 2006
Posts: 12
thank u rahul
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