Re: PostgreSQL and Bitwise and with int8 field

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



On Sat, Dec 20, 2003 at 02:44:31PM -0700, Seader, Cameron wrote:
> I am trying to get the proper output with this SQL statement:
> 
> SELECT *, (highalarm & 0xffffffff)as high1, (highalarm >> 32)as high2 FROM t444d500009b5_2_6 ORDER BY utctime DESC LIMIT 1

Try this:

SELECT *, (highalarm & x'ffffffff'::int8) AS high1, (highalarm >> 32) AS high2
FROM t444d500009b5_2_6
ORDER BY utctime DESC
LIMIT 1

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux