467,154 Members | 1,108 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,154 developers. It's quick & easy.

Creating Indexes For Declared Temporary Tables

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
  • viewed: 1538
Share:

Post your reply

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

Similar topics

11 posts views Thread by randi_clausen@ins.state.il.us | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.