problem porting MySQL SQL to Postgres - Mailing list pgsql-sql

From Dan Field
Subject problem porting MySQL SQL to Postgres
Date
Msg-id 4A063822-8EC7-11D8-9677-000A958E367A@llgc.org.uk
Whole thread Raw
Responses Re: problem porting MySQL SQL to Postgres  (Reinoud van Leeuwen <reinoud.v@n.leeuwen.net>)
Re: problem porting MySQL SQL to Postgres  (Paul Thomas <paul@tmsl.demon.co.uk>)
Re: problem porting MySQL SQL to Postgres  (Martin Marques <martin@bugs.unl.edu.ar>)
Re: problem porting MySQL SQL to Postgres  (CoL <col@mportal.hu>)
List pgsql-sql
I've stumbled across a query I don't quite understand the error message 
for.

This query is pulled from a working MySQL setup:

SELECTDEWEY_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 = 9) AND(DEWEY_TENS >= 0) AND     (DEWEY_TENS <= 9) AND(DEWEY_ONES = 0 || DEWEY_ONES = NULL)
AND(DEWEY_POINT_ONES= 0 || DEWEY_POINT_ONES = NULL) AND(DEWEY_POINT_TENS = 0 || DEWEY_POINT_TENS = NULL)
AND(DEWEY_POINT_HUNDREDS= 0 || DEWEY_POINT_HUNDREDS = NULL) AND(DEWEY_POINT_THOUSANDS = 0 || DEWEY_POINT_THOUSANDS =
NULL)AND(DEWEY_TYPE = 't') AND(DEWEY_LANG = 'en')
 
ORDER BY DEWEY_TENS


However I'm getting the following error:
 ERROR:  Unable to identify an operator '=' for types 'character' and 
'boolean' You will have to retype this query using an explicit cast.


Any help would be much appreciated

TIA
-- 
Dan Field



pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: [GENERAL] SQL script
Next
From: Reinoud van Leeuwen
Date:
Subject: Re: problem porting MySQL SQL to Postgres