Skip to content
Advertisement

While loop SQL Server

Help me please. I need to write two functions, one that calculates the factorial and another that calculates the sums of euler.

To make the euler sums I need to use the function that calculates the factory. I already have the function of factorial but when doing the sums the result I get “NULL”

Note: it needs to be done with “while” loop

My code:

Advertisement

Answer

I’d make the following change to your second function

select dbo.Sum_Euler(10) will return 2.718281801142

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement