By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,610 Members | 1,697 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,610 IT Pros & Developers. It's quick & easy.

Creating Indexes For Declared Temporary Tables

P: 1
I am currently running DB2 for Z/OS V7.1.

When I try to create and index on a declared temporary table, a -690 SQL return code occurs. My declarations are as below :

DECLARE GLOBAL TEMPORARY TABLE SESSION.TEMP_ACCBB
( PLAN_NO CHAR(11) NOT NULL,
PLAN_STATE_NO INTEGER NOT NULL,
LIFE_INDICATOR CHAR(1) NOT NULL,
CED_CLIENT_NO INTEGER NOT NULL,
CED_COMPANY SMALLINT NOT NULL,
CED_SUB_FUND_CD CHAR(3) NOT NULL,
CED_PLAN_NO CHAR(11) NOT NULL,
CED_DISTRIB_CHAN CHAR(3) NOT NULL,
BENEFIT_NO SMALLINT NOT NULL,
COVER_BASIS_CD CHAR(3) NOT NULL,
CED_DEFN_OF_DIS CHAR(3) NOT NULL,
CED_BEFORE_AFTER CHAR(1) NOT NULL,
ACC_CLIENT_NO INTEGER NOT NULL,
ACC_COMPANY SMALLINT NOT NULL,
ACC_SUB_FUND_CD CHAR(3) NOT NULL,
ACC_AMT_ACCEPTED DECIMAL(15,2) NOT NULL WITH DEFAULT
);

CREATE TYPE 2 UNIQUE INDEX SESSION.IACCBB
ON SESSION.TEMP_ACCBB
(
PLAN_NO ASC ,
PLAN_STATE_NO ASC ,
LIFE_INDICATOR ASC ,
CED_CLIENT_NO ASC ,
CED_COMPANY ASC ,
CED_SUB_FUND_CD ASC ,
CED_PLAN_NO ASC ,
CED_DISTRIB_CHAN ASC ,
BENEFIT_NO ASC ,
COVER_BASIS_CD ASC ,
CED_DEFN_OF_DIS ASC ,
CED_BEFORE_AFTER ASC ,
ACC_CLIENT_NO ASC ,
ACC_COMPANY ASC ,
ACC_SUB_FUND_CD ASC
)
CLUSTER;

The decalred temporary table seems to work fine, allowing inserts, selects, etc.

Any ideas what is causing the -690 on creating the index?
Jun 29 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.