FLOUNCES
Updated 2023-11-09 16:13:22.750000
Syntax
SELECT [westclintech].[wct].[FLOUNCES] (
<@Volume, float,>
,<@From_scale, nvarchar(4000),>)
Description
Use the scalar function FLOUNCES to convert from barrels (US beer barrels), bbl (oil barrel), bushels, cubic feet, cubic inches, cubic meters, cubic miles, cubic yards, cups, dry pints, dry quarts, fluid drams, fluid ounces, gallons, gills, imperial gallons, imperial gills, imperial pints, imperial quarts, liters, pecks, pints, quarts, steres, tablespoons or teaspoons to fluid ounces.
Arguments
@Volume
is any real number. @Volume 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 @Volume. @From_scale must be a valid value as specified in volume 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 volume units of measure into fluid ounces:
{"columns":[{"field":"column 1"},{"field":"column 2","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"teaspoon","column 2":"0.166666667"},{"column 1":"tablespoon","column 2":"0.5"},{"column 1":"fluid dram","column 2":"0.125"},{"column 1":"fluid ounce","column 2":"1"},{"column 1":"cup","column 2":"8"},{"column 1":"pint","column 2":"16"},{"column 1":"quart","column 2":"32"},{"column 1":"gallon","column 2":"128"},{"column 1":"cubic inch","column 2":"0.554112554"},{"column 1":"cubic foot","column 2":"957.506494"},{"column 1":"cubic yard","column 2":"25852.6753"},{"column 1":"cubic mile","column 2":"1.40943E+14"},{"column 1":"imperial ounce","column 2":"0.960760338"},{"column 1":"imperial pint","column 2":"19.2152068"},{"column 1":"imperial quart","column 2":"38.4304135"},{"column 1":"imperial gallon","column 2":"153.721654"},{"column 1":"barrel (beer)","column 2":"3968"},{"column 1":"barrel (oil)","column 2":"5376"},{"column 1":"bushel","column 2":"1191.57478"},{"column 1":"gill","column 2":"4"},{"column 1":"imperial gill","column 2":"4.80380169"},{"column 1":"peck","column 2":"297.893695"},{"column 1":"dry pint","column 2":"18.61835502"},{"column 1":"dry quart","column 2":"37.23671005"},{"column 1":"stere","column 2":"33814.0227"},{"column 1":"liter","column 2":"33.8140227"},{"column 1":"cubic meter","column 2":"33814.0227"}]}
Conversion of metric values (liters and cubic meters) includes all the standard prefixes with kilo representing 1,000 and yocto representing 10E-24.
Examples
select wct.FLOUNCES(1, 'quart');
Here is the result set.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"32"}]}