Results 1 to 2 of 2

Thread: bitwise ANDs in SQL

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Posts
    103

    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

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Posts
    103
    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
  •  



Click Here to Expand Forum to Full Width