SQL Question , V7 and V8 difference ?

Ravikumar Devireddy

SQL Question , V7 and V8 difference ?
Hello,

DB2 UDB on AIX.

Iam unable to run this particular query on DB2 V7
system :

db2 "SELECT a.tbspaceid tbl_tbsid, b.tbspaceid
ind_tbsid, count(distinct a.tabname) num_tbl,
count(distinct b.indname) num_ind FROM syscat.tables a
LEFT JOIN syscat.indexes b ON a.tabname = b.tabname
WHERE a.type='T' GROUP BY a.tbspaceid, b.tbspaceid"

Error : SQL0206N "B.TBSPACEID" is not valid in the
context where it is used.
SQLSTATE=42703

The same query runs fine on a V8 system,
Iam unable to figure out what is it that changed from
V7 to V8 interms of SQL functionality for this
query...

Any leads please..

Thanks.




__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm