Pardon this post here as I didn't see any Postgres forum.

I have a table with a 16 length bit value.

Can someone please help me how I do the where clause on my select?

example data for that field

0000000000000001
0000000000000011
0000000000000010

how would I select one of the 3 above?

select * from surcharge_table_fd where market_type_bit_value = 1

nevermind. figured it out

select * from surcharge_table_fd where (market_type_bit_value & '0000000000000010')::int <> 0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.