473,666 Members | 2,538 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

about replicated summary table on two base tables

HI,

I try to create summary table like following:

create table summary (a int, b int, c int)
(select a.aa, b.bb, b.cc from table_a a ,table_b b where a.key=b.key)
data initially deferred refresh immediate enable query optimization in
tablespace_test
replicated;

I got following error message:

SQL20058N The fullselect specified for the summary table summary is
invalid.

Any suggestion is welcomed.

BY the way, my DB2 is UDB Ver. 7.2 + fixpack 9.
Nov 12 '05 #1
4 3484
Maybe not too useful, but the following succeeds on one partition with
DB2 v8:

create table table_a (aa int, key int not null, primary key (key))

create table table_b (bb int, cc int, key int not null, primary key
(key))

create summary table sum_tab as
(select a.aa, b.bb, b.cc from table_a a ,table_b b
where a.key=b.key)
data initially deferred refresh deferred enable query optimization

So, in order or likely culprits, I would suspect it's failing for one of
these reasons:

1. use of the refresh immediate violates one of the refresh immediate
rules for full selects (see below)

2. the DDL of table_a and table_b has some significant differences from
the DDL I show above.

3. You're running into a v7 restriction that's been lifted in v8.

4. You're on a single partition, so REPLICATED is not required

5. You're breaking a syntax rule (SUMMARY is not a good name for a DB2
object, and there's no need to specify the data type of the columns in
the summary table)

REFRESH IMMEDIATE RULES:

the fullselect must be a subselect
the fullselect cannot include a reference to a nickname (SQLSTATE 428EC)
the subselect cannot include:
functions that are not deterministic
scalar fullselects
predicates with fullselects
special registers
a GROUP BY clause must be included in the subselect unless REPLICATED is
specified, in which case a GROUP BY clause is not allowed.
The supported column functions are SUM, COUNT, COUNT_BIG and GROUPING
(without DISTINCT). The select list must contain a COUNT(*) or
COUNT_BIG(*) column. If the materialized query table select list
contains SUM(X), where X is a nullable argument, the materialized query
table must also have COUNT(X) in its select list. These column functions
cannot be part of any expressions.
if the FROM clause references more than one table or view, it can only
define an inner join without using the explicit INNER JOIN syntax
all GROUP BY items must be included in the select list
GROUPING SETS, CUBE and ROLLUP are supported. The GROUP BY items and
associated GROUPING column functions in the select list must form a
unique key of the result set. Thus, the following restrictions must be
satisfied:
no grouping sets may be repeated. For example, ROLLUP(X,Y), X is not
allowed because it is equivalent to GROUPING SETS((X,Y),(X), (X))
if X is a nullable GROUP BY item that appears within GROUPING SETS,
CUBE, or ROLLUP, then GROUPING(X) must appear in the select list
grouping on constants is not allowed
a HAVING clause is not allowed
if in a multiple partition database partition group, then either the
partitioning key must be a subset of the GROUP BY items, or REPLICATED
must be specified
if REPLICATED is specified, the table must have a unique key

jane wrote:
HI,

I try to create summary table like following:

create table summary (a int, b int, c int)
(select a.aa, b.bb, b.cc from table_a a ,table_b b where a.key=b.key)
data initially deferred refresh immediate enable query optimization in
tablespace_test
replicated;

I got following error message:

SQL20058N The fullselect specified for the summary table summary is
invalid.

Any suggestion is welcomed.

BY the way, my DB2 is UDB Ver. 7.2 + fixpack 9.


Nov 12 '05 #2
jane wrote:
HI,

I try to create summary table like following:

create table summary (a int, b int, c int)
(select a.aa, b.bb, b.cc from table_a a ,table_b b where a.key=b.key)
data initially deferred refresh immediate enable query optimization in
tablespace_test
replicated;

I got following error message:

SQL20058N The fullselect specified for the summary table summary is
invalid.

Any suggestion is welcomed.

BY the way, my DB2 is UDB Ver. 7.2 + fixpack 9.


We don't support refresh immediate for join summary tables in Version
7 (we do in Version 8). Please refer to the SQL Reference, the CREATE
TABLE section for the complete list of rules and restrictions.

I also recommend the following redbook, it describes the functionality
available in V8:

http://www.redbooks.ibm.com/redbooks/pdfs/sg246546.pdf

Regards,
Miro

Nov 12 '05 #3
miro flasza <mi**@torolab.i bm.com> wrote in message news:<br******* ***@hanover.tor olab.ibm.com>.. .
jane wrote:
HI,

I try to create summary table like following:

create table summary (a int, b int, c int)
(select a.aa, b.bb, b.cc from table_a a ,table_b b where a.key=b.key)
data initially deferred refresh immediate enable query optimization in
tablespace_test
replicated;

I got following error message:

SQL20058N The fullselect specified for the summary table summary is
invalid.

Any suggestion is welcomed.

BY the way, my DB2 is UDB Ver. 7.2 + fixpack 9.


We don't support refresh immediate for join summary tables in Version
7 (we do in Version 8). Please refer to the SQL Reference, the CREATE
TABLE section for the complete list of rules and restrictions.

I also recommend the following redbook, it describes the functionality
available in V8:

http://www.redbooks.ibm.com/redbooks/pdfs/sg246546.pdf

Regards,
Miro

HI, Thanks for your reply.

Actually, I could create refresh immediate summary table , but now I
was ask to replicate the summary table. It seems V7 did not support
replicate for this case. I read the manual for V7, it did not say
clearly about it....
Nov 12 '05 #4
miro flasza <mi**@torolab.i bm.com> wrote in message news:<br******* ***@hanover.tor olab.ibm.com>.. .
jane wrote:
HI,

I try to create summary table like following:

create table summary (a int, b int, c int)
(select a.aa, b.bb, b.cc from table_a a ,table_b b where a.key=b.key)
data initially deferred refresh immediate enable query optimization in
tablespace_test
replicated;

I got following error message:

SQL20058N The fullselect specified for the summary table summary is
invalid.

Any suggestion is welcomed.

BY the way, my DB2 is UDB Ver. 7.2 + fixpack 9.


We don't support refresh immediate for join summary tables in Version
7 (we do in Version 8). Please refer to the SQL Reference, the CREATE
TABLE section for the complete list of rules and restrictions.

I also recommend the following redbook, it describes the functionality
available in V8:

http://www.redbooks.ibm.com/redbooks/pdfs/sg246546.pdf

Regards,
Miro

HI, Thanks for your reply.

Actually, I could create refresh immediate summary table , but now I
was ask to replicate the summary table. It seems V7 did not support
replicate for this case. I read the manual for V7, it did not say
clearly about it....
Nov 12 '05 #5

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

Similar topics

1
1863
by: miltonmoura | last post by:
Hi, I am using Merge Replication for synchronizing a bunch of laptops running MSDE with a central SQL Server 2000 production server. This database is used by an application that needs to know which records have not yet been replicated, at any givem time. Here's a simple scenario:
3
1988
by: Sam Brunetti | last post by:
Hi, A user is trying to link a summary table from a DB2 UDB V8.1 (AIX) database into Access 2000, but the table will not show up in the link window. Does anyone know whether this is a known limitation of Access not being able to see summary tables.? Or is there a way of doing this. Thank You
9
2801
by: Andrea | last post by:
Hi, I've read the former postings but was not able to solve my problem: I have a Summary Table (or MQT as you like it) and the query optimizer does not seem to use the summary table. I run the following commands: set current query optimization 9;
6
1606
by: Jax | last post by:
Custom control problem. I'm modding a textbox so that it will always have a "%" sign at the end of it. I have overrided the Text property to account for the "%" value within the textbox and have add BaseText to give access to the baseText method too. I have the text_changed event handler wired up to this method, problem is that it works ONLY every other time. The statement that works every other time is this:
0
2063
by: Henry | last post by:
Using ideas provided by some of you I was able to figure out how to get the names of the parameters fields of a crystal report specified at run time. The code below just basically puts the data into a comboBox. One thing I noticed, however, is that this method shows me both the parameters used by the main report and parameters used by the sub-report(s).
12
1768
by: Oleg Subachev | last post by:
I am moving from Delphi to C# and hve encountered the problem: I have the following classes and form Load event handler: public class class1 { public string S; public class1( string aS ) { S = aS;
2
2523
by: gordonjones | last post by:
I have users on different computers getting the error message "could not update;currently locked" when trying to leave identical fields after making a change on the same form but on different records. MS Access 2002 MDB, front-end split from data. Data stored on network server with front-end stored on local computer's desktop. Back-end data is also replicated. All forms have "Record Locks" set to No Locks, Recordset Type is Dynaset....
1
1371
by: UJ | last post by:
I am doing development on a machine and everything was working fine. The name of the project was ECS to I made all my references as ~/ECS/... Worked great. Put it on the final server running 2003/IIs 6and it bitched it couldn't find the directory. I created a virtual directory, it complained because web.config wasn't there. I removed the ECS from all the references and it works great on both my devo and the final machine.
0
1661
by: mvsmsh | last post by:
Hi all , I got a replicated source table that needs reorg to reclaim space. it was never reorganized since it created . I wonder are there any restriction or special care needed for reorg replicated table ? My nvironment is Source table : DB2.8.2 / AIX ( Primary key = uniq time stamp )
0
8454
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8883
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8787
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8561
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,...
1
6203
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5672
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
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2776
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
1778
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.