Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2008
    Posts
    11

    Unanswered: MQT - Staging table not getting populated when base table is loaded

    Hi All,

    i try to implement MQT , and refresh the MQT from the staging table. I use the following commands to create a MQT , create a staging table with "propagate immediate" option and refresh it. But when i load the base table, the staging table is not populated automatically.


    CREATE TABLE SALES_BY_TRANSID AS
    ( SELECT TRANSID, COUNT(*) AS ITEM_COUNT, SUM(AMOUNT) AS TOTAL
    FROM TRANSITEM
    GROUP BY(TRANSID) )
    DATA INITALLY DEFERRED
    REFRESH DEFERRED;

    CREATE TABLE STG_SALES_BY_TRANSID FOR SALES_BY_TRANSID PROPAGATE IMMEDIATE;

    REFRESH TABLE SALES_BY_TRANSID;

    Then i inserted some data into the base table "TRANSITEM" . But i find that - the staging table is not getting populated at all.

    did i miss out anything here?
    can anyone tel me the reason why it is not populating automatically, and also the resolution for it?

    Appreciate ur help

    Thanks,
    Arunvijay

  2. #2
    Join Date
    Apr 2008
    Posts
    51
    Yes - you missed one more REFRESH. Whenever you modify base tables(s) do manual REFRESH for REFRESH-DEFERRED MQTs.
    db2topgun.com

Posting Permissions

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