2009-07-30 20 views
5

que tienen un problema con el uso de operadores bit a bit en Postgres me sale el siguiente mensaje de erroroperadores bit a bit en Postgres

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

Mi consulta es la siguiente

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

será apreciado Cualquier ayuda

Respuesta

17

Tendrá que hacer una comparación:

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

o

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