Login     Register

        Contact Us     Search

XLeratorDB/financial Documentation

SQL Server DDB function


DDB
 
Updated: 5 August 2010
Use DDB to calculate the depreciation of an asset for a specified period using the double-declining balance method or some other user-specified method.
 
Syntax
SELECT [westclintech].[wct].[DDB] (
   <@Cost, float,>
 ,<@Salvage, float,>
 ,<@Life, float,>
 ,<@Per, int,>
 ,<@Factor, float,>)
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.
@Per
the period for which the depreciation is being calculated. To obtain meaningful results, the calendar unit used for period and the calendar unit used for life should be the same. If depreciation for a month is being calculated then the life should be expressed as a number of months. If depreciation for a quarter us being calculated, then the life should be expressed in quarters. @Per is an expression of type int or of a type that can be implicitly converted to int.
@Factor
the rate at which the balance declines. Using a @Factor of 1 will return the same results as wct.DB. If @Factor is NULL it is assumed to be 2. @Factor is an expression of type float or of a type that can be implicitly converted to float.
 
Return Type
float
Remarks
·         The double declining balance method is a form of accelerated depreciation, with the depreciation amount declining from earlier periods to later periods.
·         You can change @Factor if you want to use some other accelerated rate.
·         Use VDB if you want to switch to the straight-line method when that amount is greater than the declining balance calculation
 
Example
 
SELECT wct.DDB(600000
,0
,4
,1
,2.25)
Here is the result set
----------------------

337500



Copyright 2008-2013 WestClinTech LLC         Privacy Policy        Terms of Service