Hi! Is it possible to perform a bitwise comparison directly in a query (I guess in a field value)? Or do I need to write a function that will do this, as some reference I have found suggests.
Access (ie SQL) is not designed to do bit operations. If you use Access to store bit structures you've just got a very slow file system. It's a bit like buying an automobile just to listen to the radio.
Well, it's not really a major "bit operation" per se. It's just one field in a database I'm using contains flag values which dictate certain events. I need to evaluate those to see what else needs to get done with the record and hopefully that won't make for too much of an overload.
Max, I finished this project 6 months ago , but seeing as you brought up an interesting point, is this something that can be supported directly from the Access JET implementation of SQL or would it still need to go through a VB function? Thanks! -- Mike
I'm sorry... I've seen your post today because I need to do the same thing...
No, U don't have to go through a VB Function, your query should be something like:
SELECT ... FROM ... WHERE (flagFld BAND 2) > 0
and it will return all the record that have the 2nd bit set in the field flagFld.
I suggest to set the option on a new database, because the syntax is a bit different and previous queries could not work.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.