| title | SIGN (SSIS Expression) | |||
|---|---|---|---|---|
| description | SIGN (SSIS Expression) | |||
| author | chugugrace | |||
| ms.author | chugu | |||
| ms.date | 03/01/2017 | |||
| ms.service | sql | |||
| ms.subservice | integration-services | |||
| ms.topic | reference | |||
| helpviewer_keywords |
|
[!INCLUDEsqlserver-ssis]
Returns the positive (+1), negative (-1), or zero (0) sign of a numeric expression.
SIGN(numeric_expression)
numeric_expression
Is a valid signed numeric expression. For more information, see Integration Services Data Types.
DT_I4
SIGN returns a null result if the argument is null.
This example returns the sign of a numeric literal. The return result is -1.
SIGN(-123.45)
This example returns the sign of the result of subtracting the StandardCost column from the DealerPrice column.
SIGN(DealerPrice - StandardCost)