DOLLARDE
Updated: 5 August 2010
Use DOLLARDE to convert a dollar price, expressed as a fraction, into a dollar price, expressed as a decimal number.
Syntax
SELECT [westclintech].[wct].[DOLLARDE] (
<@Fractional_dollar, float,>
,<@Fraction, int,>)
Arguments
@Fractional_dollar
the implicit fraction to be converted. @Fractional_dollar is an expression of type float or of a type that can be implicitly converted to float.
@Fraction
the integer to be used as the denominator in converting the fraction. @Fraction is an expression of type int or of a type that can be implicitly converted to int.
Return Type
float
Remarks
· If @Fraction is less than zero, an error will be returned
· If @Fraction is equal to a zero, a divide by zero error will be returned
Example
SELECT wct.DOLLARDE(1.59
,64)
Here is the result set
----------------------
1.921875
See Also