Query problem

From: Rado Petrik <r(dot)p(at)szm(dot)sk>
To: PostgreSQL-mailinglist <pgsql-sql(at)postgresql(dot)org>
Subject: Query problem
Date: 2003-08-19 13:02:24
Message-ID: 1061298143.14403.37.camel@caj
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi, I have table "user".

table "user"

id bit(dec) bit(bin)
-----------------------------
1 1 1
2 3 11
3 12 1100

and I need query - >

SELECT "output" FROM user WHERE id = 1 OR id = 2 or id = 3
output = (1111)

In programing language output =

id(1..3) {
$output = ( bit | $output );
}

How write query ? . Thanks

--
Rado Petrik <r(dot)p(at)szm(dot)sk>

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-08-19 13:26:29 Re: postgres 7.1.3: why does the query plan ignore indexes?
Previous Message Tim Andersen 2003-08-19 12:43:45 Re: Migration from db2 to postgres'