STONES
Updated 2023-11-09 19:11:45.960000
Syntax
SELECT [westclintech].[wct].[STONES] (
<@Weight, float,>
,<@From_scale, nvarchar(4000),>)
Description
Use the scalar function STONES to convert from drams, grains, grams, hundredweights, ounces, pennyweights, pounds, stones, tonnes, tons, troy pounds or troy ounces to stones.
Arguments
@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.
@Weight
is any real number. @Weight is an expression of type float or of a type that can be implicitly converted to float.
Return Type
float
Remarks
The following table is a representation of the conversion of one of the weight units of measure into stones:
{"columns":[{"field":"column 1"},{"field":"column 2","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"grains","column 2":"0.000010204082"},{"column 1":"drams","column 2":"0.000279017857"},{"column 1":"ounces avoirdupois","column 2":"0.004464285714"},{"column 1":"pounds avoirdupois","column 2":"0.071428571429"},{"column 1":"stones","column 2":"1"},{"column 1":"hundredweights","column 2":"7.142857142857"},{"column 1":"tons","column 2":"142.857142857143"},{"column 1":"pennyweights","column 2":"0.000244897959"},{"column 1":"ounces troy","column 2":"0.004897959186"},{"column 1":"pounds troy","column 2":"0.058775510229"},{"column 1":"grams","column 2":"0.000157473044"},{"column 1":"tonnes","column 2":"157.473044285714"}]}
Conversion of grams includes all the standard prefixes with kilo representing 1,000 and yocto representing 10E-24.
Examples
select wct.STONES(100, 'lbs');
Here is the result set.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"7.14285714285714"}]}