Skip to content

Latest commit

 

History

History
64 lines (44 loc) · 2.04 KB

subtract-ssis-expression.md

File metadata and controls

64 lines (44 loc) · 2.04 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
- (Subtract) (SSIS Expression)
- (Subtract) (SSIS Expression)
chugugrace
chugu
03/01/2017
sql
integration-services
conceptual
- (subtract)
subtract operator (-)

- (Subtract) (SSIS Expression)

[!INCLUDEsqlserver-ssis]

Subtracts the second numeric expression from the first one.

Syntax

  
numeric_expression1 - numeric_expression2  
  

Arguments

numeric_expression1, numeric_expression2
Is any valid expression of a numeric data type. For more information, see Integration Services Data Types.

Result Types

Determined by the data types of the two arguments. For more information, see Integration Services Data Types in Expressions.

Remarks

  • Enclose the minus unary expression in parenthesis to ensure that the expression is evaluated in the correct order

  • If either operand is null, the result is null.

Expression Examples

This example subtracts numeric literals.

5 - 6.09  

This example subtracts the value in the StandardCost column from the value in the ListPrice column.

ListPrice - StandardCost  

This example subtracts a calculated value from the ListPrice column. The variable Discount% must be enclosed in brackets because the name includes the % character. For more information, see Identifiers (SSIS).

ListPrice - (ListPrice * @[Discount%])  

See Also

Operator Precedence and Associativity
Operators (SSIS Expression)