Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 1.98 KB

File metadata and controls

65 lines (46 loc) · 1.98 KB
title ! (Logical Not) (SSIS Expression)
description ! (Logical Not) (SSIS Expression)
author chugugrace
ms.author chugu
ms.date 03/01/2017
ms.service sql
ms.subservice integration-services
ms.topic concept-article
helpviewer_keywords
logical Not (!)
! (logical Not)

! (Logical Not) (SSIS Expression)

[!INCLUDEsqlserver-ssis]

Negates a Boolean operand.

Note

The ! operator cannot be used in conjunction with other operators. For example, you cannot combine the ! and the > operators into the !>. operator.

Syntax

  
!boolean_expression  
  

Arguments

boolean_expression
Is any valid expression that evaluates to a Boolean. For more information, see Integration Services Data Types.

Result Types

DT_BOOL

Remarks

The following table shows the result of the ! operation.

Original Boolean expression After applying the ! operator
TRUE FALSE
NULL NULL
FALSE TRUE

Expression Examples

This example evaluates to FALSE if the Color column value is "red".

!(Color == "red")  

This example evaluates to TRUE if the value of the MonthNumber variable is the same as the integer that represents the current month. For more information, see MONTH (SSIS Expression) and GETDATE (SSIS Expression).

!(@MonthNumber != MONTH(GETDATE())  

See Also

Operator Precedence and Associativity
Operators (SSIS Expression)