SQL Syntax - like FIELD and BITPATTERN = BITPATTERN?

From: Ozz Nixon <ozznixon(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: SQL Syntax - like FIELD and BITPATTERN = BITPATTERN?
Date: 2010-03-03 01:30:30
Message-ID: 052C48EA-DE99-4395-8DF7-D2787033ADA2@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I do not know how to really describe this...

In pascal I would do

If (AField and Flag3)=Flag3 then ...

Checking to see if AField contains the BIT(s) FLAG3 is set to... is
there a way to do this in a SELECT statement -- select * from ATable
where AField and 0x0004=0x0004

?

Thanks,
O.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ozz Nixon 2010-03-03 01:59:39 Re: [SOLVED] SQL Syntax - like FIELD and BITPATTERN = BITPATTERN?
Previous Message Greg Fischer 2010-03-03 01:20:01 Trigger help - updates to column data with null values