SSIS Power of a Number

The SSIS POWER function is a mathematical function that returns the numeric expression raised to the power provided by the second argument number. This article explains how to use the POWER function with an example and the syntax for finding the power of a number is as shown below.

POWER(<<numeric_expression>>, <<power>>)

The second argument should always be an integer. To demonstrate the POWER function, we use the Product table below, which has 14 records.

Source Table

SSIS Power of a Number

For this POWER function example, add a Data Flow Task and double-click on it to enter the Data Flow region. Next, add the OLE DB Source to read data from the above SQL database product table. Please join the OLE DB Source to Derived Column because it helps to write POWER expressions and create new columns.

Data Flow to add Derived Column

Next, double-click on it to open the Derived Column Transformation Editor. Drag and drop the SSIS POWER function to the row cell under the Expression and replace the numeric_expression with the Estimated to find the power of a number and second argument as Orders. Either you can manually delete the complete <<numeric_expression>> expression or drag and drop the Estimated column will automatically replace it.

The below SSIS Power function expressions use Order as the second argument to find the power of a number. So, the new columns will calculate the estimated, grade, and sales amount columns powered by orders.

POWER( [Estimated], [Orders] )

POWER( [Grade], [Orders] )

POWER( [SalesAmount], [Orders] )
SSIS Power of a Number Expression

Click OK to close the Editor window. Please refer to the Derived Column Transformation, Union All Transformation, Built-in Functions, and SQL Server articles in SSIS.

Drag and drop the Union All Transformation and connect the Derived Column to it. Next, right-click on the connection node and choose the Enable Data Viewer. Please run the SSIS POWER function package to see the power of a number in the estimated, grade, and sales columns.

SSIS Power of a Number package