Defining case insensitive Primary Key in DB2



IBM's flagship relational database management system

Re: Defining case insensitive Primary Key in DB2

Postby GuyC » Wed Nov 04, 2009 6:38 pm

The create would fail as long as there are duplicates.
You could still define it with DEFER = YES (which is good practice in most cases when creating an index). The index will be in Rebuild Pending.
The rebuild will fail as long as there are duplicates.
I can explain it to you, but i can not understand it for you.
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times

Re: Re: Defining case insensitive Primary Key in DB2

 

Re: Defining case insensitive Primary Key in DB2

Postby Neelu_Soni » Fri Nov 06, 2009 9:16 pm

Hi,

I tried UCASE with Create Index. Its not valid for the current release that we are using. Throws the following error

DSNT408I SQLCODE = -4700, ERROR: ATTEMPT TO USE NEW FUNCTION BEFORE NEW
FUNCTION MODE
DSNT418I SQLSTATE = 56038 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNHSM5X SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = 75 0 0 -1 60 507 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'0000004B' X'00000000' X'00000000' X'FFFFFFFF'
X'0000003C' X'000001FB' SQL DIAGNOSTIC INFORMATION

Neelu
Neelu_Soni
 
Posts: 5
Joined: Thu Oct 22, 2009 11:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Defining case insensitive Primary Key in DB2

Postby swd » Fri Nov 06, 2009 10:06 pm

Sounds like you are running DB2 V8 in Compatability mode, and you haven't gone to new function mode yet. Is this the case?
User avatar
swd
 
Posts: 109
Joined: Wed Feb 18, 2009 9:18 pm
Location: UK
Has thanked: 0 time
Been thanked: 0 time

Re: Defining case insensitive Primary Key in DB2

Postby Neelu_Soni » Sat Nov 07, 2009 8:34 am

Looks like it. I myself do not have DDL access to Database. I had my DBA run the Create Index. He sent me the error thown.
Neelu_Soni
 
Posts: 5
Joined: Thu Oct 22, 2009 11:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Defining case insensitive Primary Key in DB2

Postby dick scherrer » Sat Nov 07, 2009 9:01 am

Hello,

Now would probably be a good time to correct the duplicates.

Even when the new feature is available, the data will prevent a successful CREATE. . . (See the info from GuyC above).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Defining case insensitive Primary Key in DB2

Postby GuyC » Tue Nov 10, 2009 4:36 pm

swd wrote:Sounds like you are running DB2 V8 in Compatability mode, and you haven't gone to new function mode yet. Is this the case?

More likely DB2 9 in Conversion mode ;)
I can explain it to you, but i can not understand it for you.
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times

Previous

Return to DB2

 


  • Related topics
    Replies
    Views
    Last post