Logo

SQL Server TPOUNDS Function

Updated 2023-11-09 19:15:17.743000

Description

Use the scalar function TPOUNDS to convert from drams, grains, grams, hundredweights, ounces, pennyweights, pounds, stones, tonnes, tons troy pounds, or troy ounces to troy pounds.

Syntax

SELECT [westclintech].[wct].[TPOUNDS] (
  <@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 Type

float

Remarks

The following table is a representation of the conversion of one of the weight units of measure into troy pounds:

column 1column 2
grains0.00017361111
drams0.00474717881666667
ounces avoirdupois0.075954861083300
pounds avoirdupois1.215277775
stones17.01388885
hundredweights121.5277775
tons2430.55555
pennyweights0.004166667
ounces troy0.083333333
pounds troy1
grams0.00267922888333300
tonnes2679.22888333300

Conversion of grams includes all the standard prefixes with kilo representing 1,000 and yocto representing 10E-24.

Examples

select wct.TPOUNDS(100, 'lbs');

Here is the result set.

----------------------
121.5277775