Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 28001 invoked from network); 31 Oct 2007 08:48:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Oct 2007 08:48:57 -0000 Received: (qmail 91986 invoked by uid 500); 31 Oct 2007 08:48:44 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 91956 invoked by uid 500); 31 Oct 2007 08:48:43 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 91945 invoked by uid 99); 31 Oct 2007 08:48:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2007 01:48:43 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.43.24] (HELO sca-ea-mail-1.sun.com) (192.18.43.24) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2007 08:48:45 +0000 Received: from dm-norway-01.uk.sun.com ([129.156.101.193]) by sca-ea-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l9V8mGgJ003103 for ; Wed, 31 Oct 2007 08:48:24 GMT Received: from clustra.norway.sun.com (clustra.Norway.Sun.COM [129.159.119.10]) by dm-norway-01.uk.sun.com (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with SMTP id l9V8mFhd005845 for ; Wed, 31 Oct 2007 08:48:15 GMT Received: (qmail 14121 invoked from network); 31 Oct 2007 08:48:14 -0000 Received: from khepri35.norway.sun.com (129.159.112.247) by clustra.norway.sun.com with QMQP; 31 Oct 2007 08:48:14 -0000 Date: Wed, 31 Oct 2007 09:48:14 +0100 From: "Bernt M. Johnsen" To: Derby Discussion Subject: Re: NULL checking in Derby Message-ID: <20071031084814.GB9014@khepri35.norway.sun.com> References: <1eb85fd50710261743m78eb4f0fl576aeeeb0c44ec4f@mail.gmail.com> <1eb85fd50710261936i6876c447u2989e614d4330e88@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wzJLGUyc3ArbnUjN" Content-Disposition: inline In-Reply-To: <1eb85fd50710261936i6876c447u2989e614d4330e88@mail.gmail.com> Organization: Sun Microsystems User-Agent: Mutt/1.5.7i X-Virus-Checked: Checked by ClamAV on apache.org --wzJLGUyc3ArbnUjN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, >>>>>>>>>>>> Soumen Saha wrote (2007-10-26 22:36:19): > DELETE FROM QUIZ_OPTIONS_INFO WHERE OPTION_TEXT IN ('',null); >=20 This statement is strictly not allowed in SQL since the data type of null is not determinable. You should write something like DELETE FROM QUIZ_OPTIONS_INFO WHERE OPTION_TEXT IN ('',CAST(null AS VARCHAR= (10))); > This is working in SQL Server but not in Derby... The error is Error code > -1, SQL state 42X01: Syntax error: Encountered "NULL" . Could some one > please tell the solution... My aim is to delete all the rows where the > OPTION_TEXT is empty.. >=20 > Thanks & Regards, > Soumen --=20 Bernt Marius Johnsen, Database Technology Group,=20 Staff Engineer, Derby/Java DB Sun Microsystems, Trondheim, Norway --wzJLGUyc3ArbnUjN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (SunOS) iD8DBQFHKEFNlFBD9TXBAPARAo55AKCa8IAQ55R+qou9vAQfi0u93uq8HQCfbYZB gptUdC6M1Jlgfcg6/Gy6Vjw= =7nbF -----END PGP SIGNATURE----- --wzJLGUyc3ArbnUjN--