|
-
Sep 10th, 2002, 11:03 AM
#1
Thread Starter
Lively Member
bitwise ANDs in SQL
I am trying to do a SQL query for a JET database access using a bitwise AND.
"SELECT * FROM contacts WHERE (contactType AND 2);"
so that all records where the 2nd bit of contactType is true would be returned.
The problem is that I can't find how to do the AND. It seems that in SQL Server, you could do
"SELECT * FROM contacts WHERE (contactType & 2);"
but this doesn't work as a JET query, and there doesn't seem to be an equivalent. Am I going to have to break the current long Integer field into lots of independent Booleans, or is there a way to do it.
Anyone??
Aidan
-
Sep 10th, 2002, 04:03 PM
#2
Thread Starter
Lively Member
surely someone must know whether this is possible
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|