Logo

BUSHELS

Updated 2023-11-09 15:42:55.410000

Syntax

SELECT [westclintech].[wct].[BUSHELS] (
  <@Volume, float,>
 ,<@From_scale, nvarchar(4000),>)

Description

Use BUSHELS 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 bushels.

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 bushels:

{"columns":[{"field":"column 1"},{"field":"column 2","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"teaspoon","column 2":"0.000139871"},{"column 1":"tablespoon","column 2":"0.000419613"},{"column 1":"fluid dram","column 2":"0.000104903"},{"column 1":"fluid ounce","column 2":"0.000839226"},{"column 1":"cup","column 2":"0.006713804"},{"column 1":"pint","column 2":"0.013427609"},{"column 1":"quart","column 2":"0.026855218"},{"column 1":"gallon","column 2":"0.10742087"},{"column 1":"cubic inch","column 2":"0.000465025"},{"column 1":"cubic foot","column 2":"0.803563913"},{"column 1":"cubic yard","column 2":"21.6962257"},{"column 1":"cubic mile","column 2":"1.18283E+11"},{"column 1":"imperial ounce","column 2":"0.000806295"},{"column 1":"imperial pint","column 2":"0.016125892"},{"column 1":"imperial quart","column 2":"0.032251785"},{"column 1":"imperial gallon","column 2":"0.12900714"},{"column 1":"barrel (beer)","column 2":"3.33004698"},{"column 1":"barrel (oil)","column 2":"4.511676554"},{"column 1":"bushel","column 2":"1"},{"column 1":"gill","column 2":"0.003356902"},{"column 1":"imperial gill","column 2":"0.004031473"},{"column 1":"peck","column 2":"0.25"},{"column 1":"dry pint","column 2":"0.015625"},{"column 1":"dry quart","column 2":"0.03125"},{"column 1":"stere","column 2":"28.3775918"},{"column 1":"liter","column 2":"0.028377592"},{"column 1":"cubic meter","column 2":"28.3775918"}]}

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.BUSHELS(1, 'quart');

Here is the result set

----------------------
          0.0268552176