VDB
Updated: 5 August 2010
Use VDB to calculate the depreciation of an asset for a specified or partial period by using a declining balance method
Syntax
SELECT [westclintech].[wct].[VDB] (
<@Cost, float,>
,<@Salvage, float,>
,<@Life, float,>
,<@Start_period, float,>
,<@End_period, float,>
,<@Factor, float,>
,<@No_switch, bit,>)
Arguments
@Cost
the total acquisition cost of the asset. @Cost is an expression of type float or of a type that can be implicitly converted to float.
@Salvage
the estimated value of the asset at the end of the depreciation period. @Salvage is an expression of type float or of a type that can be implicitly converted to float.
@Life
the estimated useful life of the asset. @Life is an expression of type float or of a type that can be implicitly converted to float.
@Start_period
is the starting period for which you want to calculate the depreciation. To obtain meaningful results, the calendar unit used for @Start_period and the calendar unit used for @Life should be the same. @Start_period is an expression of type float or of a type that can be implicitly converted to float.
@End_period
is the ending period for which you want to calculate the depreciation. To obtain meaningful results, the calendar unit used for @End_period and the calendar unit used for life should be the same. @End_period is an expression of type float or of a type that can be implicitly converted to float.
@Factor
is the rate at which the balance declines. If @Factor is NULL, it is assumed to be 2 (the double-declining balance method). Change @Factor if you do not want to use the double-declining balance method. For a description of the double-declining balance method, see wct.DDB. @Factor is an expression of type float or of a type that can be implicitly converted to float.
@No_switch
is a logical value specifying whether to switch to straight-line depreciation when depreciation is greater than the declining balance calculation. 0 = false, 1 = true. @No_switch is an expression of type bit or of a type that can be implicitly converted to bit.
Return Type
float
Remarks
· VDB will automatically switch from double declining balance to straight-line depreciation when straight-line is greater than double declining balance when @No_switch is set to true.
Examples
SELECT wct.VDB(2400
,300
,10
,6
,7
,1.5
,1)
Here is the result set
----------------------
135.773825625