Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Posts
    12

    Lightbulb Unanswered: 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)

  2. #2
    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 ;

  3. #3
    Join Date
    Sep 2006
    Posts
    12
    thank u rahul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •