& (Bitwise AND) (SSIS Expression)
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
Performs a bitwise AND operation of two integer values. It compares each bit of its first operand to the corresponding bit of its second operand. If both bits are 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to 0.
Both conditions must be a signed integer type or both conditions must be an unsigned integer type.
Determined by data types of the two arguments. For more information, see Integration Services Data Types in Expressions.
This example performs a bitwise AND operation between the columns NumberA and NumberB. NumberA contains 3 (0000011) and column NumberB contains 7 (00000111).
NumberA & NumberB
The expression evaluates to 3 (00000011).
This example performs a bitwise AND operation between the ReorderPoint and SafetyStockLevel columns.
ReorderPoint & SafetyStockLevel
If ReorderPoint is 10 and SafetyStockLevel is 8, the expression evaluates to 8 (00001000).
This example performs a bitwise AND operation between two integers.
3 & 5
The expression evaluates to 1(00000001).