dbo.fn_PercDiff

Syntax:
dbo.fn_PercDiff(price1, price2)

Output:
(decimal) Returns the difference in percentage between price1 and price2. When price2 is greater than price1 the result is positive, otherwise is negative.

Input parameters:
price1 (decimal)First price of the range.
price2 (decimal)Second price of the range.

Example:

select dbo.fn_PercDiff(7.4, 9)
returns 21.62