From derby-dev-return-25563-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Tue Aug 01 18:21:49 2006 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 78419 invoked from network); 1 Aug 2006 18:21:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Aug 2006 18:21:48 -0000 Received: (qmail 82588 invoked by uid 500); 1 Aug 2006 18:21:47 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 82563 invoked by uid 500); 1 Aug 2006 18:21:47 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 82554 invoked by uid 99); 1 Aug 2006 18:21:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2006 11:21:47 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2006 11:21:47 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C46BD7141E3 for ; Tue, 1 Aug 2006 18:19:15 +0000 (GMT) Message-ID: <20566690.1154456355801.JavaMail.jira@brutus> Date: Tue, 1 Aug 2006 11:19:15 -0700 (PDT) From: "Andrew McIntyre (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1620) SQL CASE statement returns ERROR 42X89 when including NULL as a return value In-Reply-To: <21161059.1154444113888.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1620?page=all ] Andrew McIntyre updated DERBY-1620: ----------------------------------- Attachment: (was: SQL2003_Standard_Case_Expression.doc) > SQL CASE statement returns ERROR 42X89 when including NULL as a return value > ---------------------------------------------------------------------------- > > Key: DERBY-1620 > URL: http://issues.apache.org/jira/browse/DERBY-1620 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.1.3.1 > Environment: Windows XP > Reporter: John Peterson > Attachments: Derby_Community_Discussion.doc, sysinfo_and_example.txt > > > This bug appears to be related to the DERBY-7 bug (NULLIF() function). When NULL is used during a CASE statement, Derby requires the NULL to be CAST to the appropriate type. This does not appear to meet the SQL 2003 Standard for the Case Expression (see attached Word document). See the attached Word document to view the Derby Community Discussion about this issue. See the attached .TXT to view the SYSINFO and to see an example of the steps to reproduce using IJ. > Steps to Reproduce: > 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. > Current Workaround: > ij>values case when 1=2 then 3 else cast(NULL as INT) end; -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira