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 > MQT - Staging table not getting populated when base table is loaded

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-12-08, 09:08
aveerabadran aveerabadran is offline
Registered User
 
Join Date: Mar 2008
Posts: 11
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
Reply With Quote
  #2 (permalink)  
Old 04-01-08, 17:10
SuperKuper SuperKuper is offline
Registered User
 
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
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