How do I use the Binary AND operator in a select?

From: "Chris Pizzo" <chris(at)artinside(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: How do I use the Binary AND operator in a select?
Date: 2002-10-01 18:41:36
Message-ID: 000901c2697a$2c7aff20$832aa8c0@itchrisp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi everyone,
I'm trying to do a binary AND in a select statement but I get the following
error:
select * from new_tabl where ((col & 64) != 0);

ERROR: Unable to identify an operator '&' for types 'int4' and 'int4'
You will have to retype this query using an explicit cast

I'm not sure what's wrong. col is defined as INTEGER.

Any help would be appreciated.

Chris

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message eric soroos 2002-10-01 18:48:29 Index use for case insensitive query
Previous Message Steinn E. Sigurdarson 2002-09-30 21:45:37 Re: PostgresQL applications using libpq