Skip to content

Latest commit

 

History

History
66 lines (49 loc) · 1.88 KB

logical-and-ssis-expression.md

File metadata and controls

66 lines (49 loc) · 1.88 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
&& (Logical AND) (SSIS Expression)
&& (Logical AND) (SSIS Expression)
chugugrace
chugu
03/01/2017
sql
integration-services
conceptual
&& (logical AND)
AND, logical AND
logical AND (&&)

&& (Logical AND) (SSIS Expression)

[!INCLUDEsqlserver-ssis]

Performs a logical AND operation. The expression evaluates to TRUE if all conditions are TRUE.

Syntax

  
boolean_expression1 && boolean_expression2  

Arguments

boolean _expression1, boolean_expression2
Is any valid expression that evaluates to TRUE, FALSE, or NULL.

Result Types

DT_BOOL

Remarks

The following table shows the result of the && operator.

Result Expression Expression
TRUE TRUE TRUE
FALSE TRUE FALSE
FALSE FALSE FALSE
NULL NULL NULL
NULL NULL TRUE
FALSE NULL FALSE

Expression Examples

This example uses the StandardCost and the ListPrice columns. The example evaluates to TRUE if the value of the StandardCost column is less than 300 and the ListPrice column is greater than 500.

StandardCost < 300 && ListPrice > 500  

This example uses the variables SPrice and LPrice instead of literals.

StandardCost < @SPrice && ListPrice > @LPrice  

See Also

& (Bitwise AND) (SSIS Expression)
Operator Precedence and Associativity
Operators (SSIS Expression)