db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prasenjit Sarkar <psar...@almaden.ibm.com>
Subject RE: ERROR 42X89: Types 'INTEGER' and 'CHAR' are not type compatible. Neither type is assignable to the other type.
Date Thu, 27 Jul 2006 20:39:46 GMT
I would second this issue - it cost us a lot of time to change all integer
case statements using CAST AS CHAR...

Prasenjit Sarkar
Research Staff Member
Master Inventor
Storage Systems
IBM Almaden Research


                                                                           
             "Peterson, John"                                              
             <John.Peterson@pe                                             
             ga.com>                                                    To 
                                       "Derby Discussion"                  
             07/27/2006 01:30          <derby-user@db.apache.org>          
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         RE: ERROR 42X89: Types 'INTEGER'    
                  "Derby               and 'CHAR' are not type compatible. 
                Discussion"            Neither type is assignable to the   
             <derby-user@db.ap         other type.                         
                 ache.org>                                                 
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           





Dan,

I forgot to mention that I verified the reported behavior both on
release 10.1.3.1 and on snapshot 10.2.0.4-423199.  The DERBY-7 issue
appears to be different, as it relates to the nullif() function rather
than the case statement.

John


-----Original Message-----
From: Daniel John Debrunner [mailto:djd@apache.org]
Sent: Thursday, July 27, 2006 4:20 PM
To: Derby Discussion
Subject: Re: ERROR 42X89: Types 'INTEGER' and 'CHAR' are not type
compatible. Neither type is assignable to the other type.

Peterson, John wrote:

> Hello,
>
> It was reported to me that one of the reasons our software currently
> doesn't work with Apache Derby is because of ERROR 42X89.  One of the
> engineering teams reported: "We found that there is a bug in Derby in
> its support for the Case statement. There is a workaround but that
> will require us to change the SQL generation code to specifically
> check if we're connected to Derby and generate a different SQL
> syntax."  After inquiring after the specifics, I was provided with the

> following
> example:
>
> ij>values case when 1=2 then 3 else NULL end;
> ERROR 42X89:  Types 'INTEGER' and 'CHAR' are not type compatible.
> Neither type is assignable to the other type.
>
> Is this indeed a bug (that will be fixed in the future), or is Derby
> behaving as it was intended?

I think this is DERBY-7

http://issues.apache.org/jira/browse/DERBY-7

which was fixed in the 10.1.3 release.

Dan.




Mime
View raw message