Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 2.34 KB

divide-ssis-expression.md

File metadata and controls

67 lines (45 loc) · 2.34 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Divide (SSIS Expression)
Divide (SSIS Expression)
chugugrace
chugu
03/01/2017
sql
integration-services
reference
/ (divide)
divide operator (/)

Divide (SSIS Expression)

[!INCLUDEsqlserver-ssis]

Divides the first numeric expression by the second one.

Syntax

  
dividend / divisor  
  

Arguments

dividend
Is the numeric expression to divide. dividend can be any valid numeric expression. For more information, see Integration Services Data Types.

divisor
Is the numeric expression to divide the dividend by. divisor can be any valid numeric expression except zero.

Result Types

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

Remarks

If either operand is null, the result is null.

Dividing by zero is not legal. Depending on how the divisor subexpression is evaluated, one of following errors occurs:

  • If the divisor subexpression that evaluates to zero is a constant, the error appears at design time, causing the expression to fail validation.

  • If the divisor subexpression that evaluates to zero contains variables, but no input columns, the component to which the expression belongs fails the pre-execution validation that occurs before the package runs.

  • If the divisor subexpression that evaluates to zero contains input columns, the error appears at run time and is handled according to the error flow rules of the data flow component.

Expression Examples

This example divides two numeric literals.

25 / 5  

This example divides values in the ListPrice column by values in the StandardCost column.

ListPrice / StandardCost  

See Also

Operator Precedence and Associativity
Operators (SSIS Expression)