共用方式為


POWER (SSIS 運算式)

適用於: SQL Server Azure Data Factory 中的 SSIS Integration Runtime

傳回數值運算式的乘冪結果。 power 參數必須評估為整數。

語法

  
POWER(numeric_expression,power)  

引數

numeric_expression
有效的數值運算式。

power
有效的數值運算式。

結果類型

DT_R8

備註

numeric_expressionpower 引數會在計算 power 之前,轉換成 DT_R8 資料類型。 如需詳細資訊,請參閱 Integration Services 資料類型

如果 numeric_expression 評估為零,且 power 為負數,則運算式評估工具會傳回錯誤並將傳回結果設為 Null。

如果 numeric_expressionpower 評估為未定的結果,則傳回結果為 Null。

power 引數可以是分數。 例如,您可以使用數值 0.5 做為 power。

運算式範例

這個範例使用數值常值。 函數會將 4 自乘至 3 的乘冪,並傳回 64。

POWER(4,3)  

此範例使用 Length 資料行和 DimensionCount 變數。 如果 Length 是 8 且 DimensionCount 是 2,則傳回結果為 64。

POWER(Length, @DimensionCount)   

另請參閱

函數 (SSIS 運算式)