2009-07-30 13 views
5

mam problem z pomocą operatorów bitowe w PostgreSQL otrzymuję następujący komunikat o błędziebitowe operatorów w PostgreSQL

ERROR: argument of WHERE must be type boolean, not type integer 

Moje zapytanie wygląda jak poniżej

SELECT DISTINCT number,name,contact,special FROM clients WHERE special & 2048; 

Każda pomoc będzie mile widziane

Odpowiedz

17

Musisz porównać:

SELECT DISTINCT number, ..., special FROM clients WHERE special & 2048 = 2048; 

lub

SELECT DISTINCT number, ..., special FROM clients WHERE special & 2048 > 0;