Sunday, February 12, 2012

Bitwise & operator does not work

I would like to do something like a SELECT * FROM Files WHERE (Attributes & ?) but the & operator isn't recognized. I looked at the documentation sample for it and in the sample the & operator isn't used in the WHERE clause so I thought that might be the reason but I still can't get the operator to work. So even the doc sample code for it doesn't work.

The code in the documentation sample for & does work for me.

I get the expected result, 10, printed on my console.

Robert Wishlaw

|||I got this to work by rewriting the WHERE clause as (Attributes & ? = ?). However, the VS query designer can't parse the bitwise operators.

No comments:

Post a Comment