RE: Bitwise Comparison in WHERE Clause
From: Kevin Yu [MSFT] (v-kevy_at_online.microsoft.com)
Date: 04/24/04
- Next message: S N: "How to Compact database using ASP page"
- Previous message: Val Mazur: "Re: Client Database Solution, or best practice"
- In reply to: Michael Hlavinka: "Bitwise Comparison in WHERE Clause"
- Next in thread: Michael Hlavinka: "RE: Bitwise Comparison in WHERE Clause"
- Reply: Michael Hlavinka: "RE: Bitwise Comparison in WHERE Clause"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 24 Apr 2004 03:40:23 GMT
Hi Michael,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to know how to do bitwise
comparison in the WHERE clause of a SELECT statement. If there is any
misunderstanding, please feel free to let me know.
As far as I know, bitwise operators are provided by T-SQL. Bitwise
operators are used on int, smallint, or tinyint data. The ~ (Bitwise NOT)
operator can also use bit data. All bitwise operators perform an operation
on the one or more specified integer values as translated to binary
expressions within Transact-SQL statements. To check bitwise operations,
you can convert or calculate decimal values. Here are the bitwise operators
available in T-SQL.
& (Bitwise AND)
~ (Bitwise NOT)
| (Bitwise OR)
^ (Bitwise Exclusive OR)
For more information, please check the following link. Examples are include
when you click on each operator.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8
_qd_02_55rn.asp
HTH. If anything is unclear, please feel free to reply to the post.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
- Next message: S N: "How to Compact database using ASP page"
- Previous message: Val Mazur: "Re: Client Database Solution, or best practice"
- In reply to: Michael Hlavinka: "Bitwise Comparison in WHERE Clause"
- Next in thread: Michael Hlavinka: "RE: Bitwise Comparison in WHERE Clause"
- Reply: Michael Hlavinka: "RE: Bitwise Comparison in WHERE Clause"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|