Login     Register

        Contact Us     Search

XLeratorDB/financial Documentation

SQL Server DOLLARFR function


DOLLARFR
 
Updated: 5 August 2010
Use DOLLARFR to Convert a dollar price, expressed as a decimal number, into a dollar price, expressed as a fraction.
 
Syntax
SELECT [westclintech].[wct].[DOLLARFR] (
   <@Decimal_dollar, float,>
 ,<@Fraction, int,>)
Arguments
@Decimal_dollar
the decimal number to be converted. @Decimal_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 Types
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
Examples
 
SELECT wct.DOLLARFR(1.921875
,64)
Here is the result set
----------------------
1.59

 

See Also

 



Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service