| From: | CoL <col(at)mportal(dot)hu> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: problem porting MySQL SQL to Postgres |
| Date: | 2004-04-15 11:30:12 |
| Message-ID: | c5lro4$2mip$1@news.hub.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
hi,
Dan Field wrote:
> 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 = 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.
use OR not ||.
C.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Martin Marques | 2004-04-15 11:30:20 | Re: problem porting MySQL SQL to Postgres |
| Previous Message | Paul Thomas | 2004-04-15 11:15:23 | Re: problem porting MySQL SQL to Postgres |