X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 15EBBD1D06F for ; Thu, 15 Apr 2004 08:31:59 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 85185-03 for ; Thu, 15 Apr 2004 08:32:00 -0300 (ADT) Received: from bugs.unl.edu.ar (bugs.unl.edu.ar [168.96.132.208]) by svr1.postgresql.org (Postfix) with ESMTP id C95A6D1D065 for ; Thu, 15 Apr 2004 08:31:56 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by bugs.unl.edu.ar (Postfix) with ESMTP id 9B93D11E7B; Thu, 15 Apr 2004 08:30:22 -0300 (ART) Received: from bugs.unl.edu.ar ([127.0.0.1]) by localhost (bugs [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15386-04; Thu, 15 Apr 2004 08:30:22 -0300 (ART) Received: from localhost (localhost [127.0.0.1]) by bugs.unl.edu.ar (Postfix) with ESMTP id AF21C11DC2; Thu, 15 Apr 2004 08:30:21 -0300 (ART) From: Martin Marques To: Dan Field , pgsql-sql@postgresql.org Subject: Re: problem porting MySQL SQL to Postgres Date: Thu, 15 Apr 2004 08:30:20 -0300 User-Agent: KMail/1.5.4 References: <4A063822-8EC7-11D8-9677-000A958E367A@llgc.org.uk> In-Reply-To: <4A063822-8EC7-11D8-9677-000A958E367A@llgc.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200404150830.20125.martin@bugs.unl.edu.ar> X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at unl.edu.ar X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/137 X-Sequence-Number: 17512 El Jue 15 Abr 2004 07:25, Dan Field escribi=F3: > I've stumbled across a query I don't quite understand the error message > for. > > This query is pulled from a working MySQL setup: > > SELECT > DEWEY_ID, DEWEY_HUNDREDS, DEWEY_TENS, DEWEY_ONES, DEWEY_POINT_ONES, > DEWEY_POINT_TENS, > DEWEY_POINT_HUNDREDS, DEWEY_POINT_THOUSANDS, DEWEY_TYPE, DEWEY_LANG, > DEWEY_SUBJECT FROM lu_dewey > WHERE > (DEWEY_HUNDREDS =3D 9) AND > (DEWEY_TENS >=3D 0) AND > (DEWEY_TENS <=3D 9) AND > (DEWEY_ONES =3D 0 || DEWEY_ONES =3D NULL) AND > (DEWEY_POINT_ONES =3D 0 || DEWEY_POINT_ONES =3D NULL) AND > (DEWEY_POINT_TENS =3D 0 || DEWEY_POINT_TENS =3D NULL) AND > (DEWEY_POINT_HUNDREDS =3D 0 || DEWEY_POINT_HUNDREDS =3D NULL) AND > (DEWEY_POINT_THOUSANDS =3D 0 || DEWEY_POINT_THOUSANDS =3D NULL) AND > (DEWEY_TYPE =3D 't') AND > (DEWEY_LANG =3D 'en') > ORDER BY DEWEY_TENS > > > However I'm getting the following error: > > ERROR: Unable to identify an operator '=3D' for types 'character' and > 'boolean' You will have to retype this query using an explicit cast. 1) Change the "=3D NULL" to "IS NULL" which is how it's defined in the SQL= =20 standards. 2) What data type does DEWEY_TYPE have? --=20 08:28:01 up 37 days, 12:55, 2 users, load average: 0.72, 0.77, 0.90 ----------------------------------------------------------------- Mart=EDn Marqu=E9s | select 'mmarques' || '@' || 'unl.edu.ar' Centro de Telematica | DBA, Programador, Administrador Universidad Nacional del Litoral -----------------------------------------------------------------