Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert weight to stones


STONES
 
Updated: 01 December 2008 

Use STONES to convert from drams, grains, grams, hundredweights, ounces, pennyweights, pounds, stones, tonnes, tons, troy pounds, or troy ounces to stones.
Syntax
SELECT [westclintech].[wct].[STONES] (
  <@Weight, float,>
 ,<@From_scale, nvarchar(4000),>)
Arguments
@Weight
is any real number. @Weight is an expression of type float or of a type that can be implicitly converted to float
@From_scale
is the description of the units for @Weight. @From_scale must be a valid value as specified in weight unit representations@From_scale must be of a data type that is implicitly convertible to varchar.
 
Return Types
float
Remarks
·         The following table is a representation of the conversion of one of the weight units of measure into stones:
grains
0.000010204082
drams
0.000279017857
ounces avoirdupois
0.004464285714
pounds avoirdupois
0.071428571429
stones
1
hundredweights
7.142857142857
tons
142.857142857143
pennyweights
0.000244897959
ounces troy
0.004897959186
pounds troy
0.058775510229
grams
0.000157473044
tonnes
157.473044285714
 
·         Conversion of grams includes all the standard prefixes with kilo representing 1,000 and yocto representing 10E-24.
Example
 
select wct.STONES(100, 'lbs')
Here is the result set
----------------------
7.14285714285714
 
(1 row(s) affected)


Copyright 2008-2017 Westclintech LLC         Privacy Policy        Terms of Service