Search code examples
ssisderived-column

divide by zero error (SSIS)


Within SSIS I am trying to do a simple division:

TotalIncurredAmount / TotalPremiumAmount`

So I wrote the following expression in an SSIS Derived Column transformation:

TotalIncurredAmount / (ISNULL(TotalPremiumAmount) ? 1 : TotalPremiumAmount)

But I am still getting the divide by zero error!

What am I missing?


Solution

  • You are obviously still returning zero values.

    Check your TotalPremiumAmount column for actual zero values as well asnulls and if there is any, handle them in whatever way best fits your solution.