Search Postgresql Archives

Re: [SOLVED] SQL Syntax - like FIELD and BITPATTERN = BITPATTERN?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Figured it out:

./sql -S=10.1.10.232
PostgreSQL v8.x Compatible SQL Command Line Tool by 3F, LLC (www.3flabs.com )

SQL> select * from bffcomwiki where flags & 8 != 0;
pagename
= = = = = = ========================================================================
Welcome

1 records found in 3.00 ms.

SQL>


On Mar 2, 2010, at 8:30 PM, Ozz Nixon wrote:

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.


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux