473,663 Members | 2,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Materialized Query Syntax--I can't get the samples to work

This is a simplistic test table I am trying to create. The syntax is
directly based up on the sample code from the BI Redbook:

CREATE TABLE CUSDTA021/MQT_DB AS
(
SELECT SUM(ML1OQ) AS TOTAL_SUM,
M1PN
FROM FRNDTA021/M1P M1P
WHERE M1LOT# = ''
GROUP BY M1PN
)

DATA INITIALLY DEFERRED --Create but don't populate
REFRESH DEFERRED --Populate/refresh later
--ENABLE QUERY OPTIMIZATION
--MAINTAINED BY USER ; --instead of system
When I run this command without the commented out parameters, I get the
error message "Valid tokens: ENABLE DISABLE" If I supply the ENABLE
QUERY OPTIMIZATION parameter, I get prompted for the MAINTAINED BY
parameter. I found these in the CREATE TABLE spec for materialized
queries, but they are not listed in the samples.

By putting in the commented out parameters, the table is created
without a hitch. Well, actually, the created table isn't journaled but
I don't really care about that. The problem I have is that I need to
create SYSTEM-maintained tables with a DEFERRED REFRESH so that I can
use staging tables.

Oddly enough, according to page 28 of the Redbook I am using as a guide
(SB24-6546-00) I shouldn't be able to populate the newly created table
using the REFRESH TABLE command. However, it works like a charm. What
I cannot do is a REFRESH TABLE INCREMENTAL, which is really why I am
having to fret over this syntax issue to such a degree.

Any clarification about why I can't create SYSTEM maintained tables
would be very welcome.

Nov 12 '05 #1
0 1193

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2758
by: Ed_No_Spam_Please_Weber | last post by:
Hello All & Thanks in advance for your help! Background: 1) tblT_Documents is the primary parent transaction table that has 10 fields and about 250,000 rows 2) There are 9 child tables with each having 3 fields each, their own PK; the FK back to the parent table; and the unique data for that table. There is a one to many relation between the parent and each of the 9 child rows. Each child table has between 100,000 and 300,000
2
2206
by: Tim Simmons | last post by:
I am stumped. I encoded the action = of my form using GET and I can't seem to get the property/value stuff from it using a JavaScript script I got from the web. I want to create a trivia game where the user gets 1 question at a time and it keeps scoring until the end and gives a summary and I want to do it only in JavaScript (no ASP, PHP, JSP, etc). I tried submitting the quiz page to itself using a query string to keep track of...
10
3472
by: Susan M. | last post by:
I'm trying to do a query that joins two tables. The trick is that I only want it to return rows based on a certain criteria. Table 1: Inventory Fields: Inventory #, Description Table 2: Prices Fields: Inventory #, Price, Effective Year, Effective Month, Effective Day
6
12276
by: Bruce | last post by:
I want to create a new table based on an existing table, but I don't want the tables to have any enforced relationship. Is this possible without having to do a CREATE TABLE and an INSERT? create table customer_Temp as (select credit_Card_number, personal_id_number from customer) DATA INITIALLY DEFERRED REFRESH deferred; refresh table customer_temp;
1
1299
by: gordongekko | last post by:
Hi! I'm writing a program that interacts with a db2 database through jdbc. I frequently need to run a quite query q1 that involves several full outer join of a table with itself. Once q1 is executed I need to postprocess the result. This postprocessing involves several queries on the result of q1. I think that the best solution would be to materialize the result of q1 in the database. How can I do it? Thanks a lot in advance!
5
1387
by: tonylc | last post by:
Hey guys, In my burn project, I have everything working except the cancellation of the burn. I have it setup such that when the user initiates a "cancel" the IDiscMasterProgressEvents handler will set the argument to true as shown: HRESULT STDMETHODCALLTYPE CDProgressEvents::QueryCancel(boolean *pbCancel) { if (*m_cancel == true)
0
1388
by: AP | last post by:
I use the following snippet to open a build a querydef. This works great with a query that has a parameter that points to a form, but if I try to use it in a parameter query, even if the parameter is defined I get the following error 2482 Access cant find the name 'enter year' you entered in your expression. 'This is the code snippet I use to open see below for an example of
2
9182
by: flipperqm | last post by:
I have 2 queries with alot of data but when i run the find unmatched query wizard, i tell it which 2 queries but when it asked me to tell it which 2 fields to match, it doesn't show any fields . They are blank matching fields. I read up on the jet service pack and about the macro settings well i have mine on allow all so i don't know what the problem is. Microsoft Access 2007
2
1890
by: --CELKO-- | last post by:
Is there a good source for the performance details of Materialized Query Tables? I have to worry about how often to refresh them in UDB. Yes, I know that is very vague.
0
8345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8548
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8634
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7371
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5657
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4349
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2000
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.