Thursday, September 09, 2010 Register
XLeratorDB/strings Online Documentation
FRAC2DEC
No Comments Yet

wct.FRAC2DEC

Updated: 30 April 2009

Use wct.FRAC2DEC to convert a fraction, as text, to a numeric value.
 Syntax
SELECT [wctString].[wct].[FRAC2DEC] (
   <@Frac, nvarchar(4000),>)
Arguments
@Frac
is the fraction value, as text, to be evaluated. The @Frac argument can be of data types that are implicitly convertible to nvarchar or ntext.
 
Return Types
float
Remarks
·         FRAC2DEC always returns the floating point value of the fraction.
Examples
 
select wct.FRAC2DEC('355/113')
 
This produces the following result
----------------------
3.14159292035398
 
(1 row(s) affected)


 
select 355/113
 
This produces the following result
-----------
3
 
(1 row(s) affected)
 


select
cast(355 as float)/cast(113.00 as float)
 
This produces the following result
----------------------
3.14159292035398
 
(1 row(s) affected)


  Comments

 |  View Topic History  |
Print  
Privacy StatementTerms Of UseCopyright 2010 WestClinTech LLC

BorderBoxedGrayBoxedGreenBlue Small width layoutMedium width layoutMaximum width layoutMaximum textMedium textSmall textBack Top!