Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert volume to bushels


BUSHELS
 
Updated: 01 December 2008 

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.
Syntax
SELECT [westclintech].[wct].[BUSHELS] (
  <@Volume, float,>
 ,<@From_scale, nvarchar(4000),>)
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 Types
float
Remarks
·         The following table is a representation of the conversion of one of the volume units of measure into bushels:
teaspoon
0.000139871
tablespoon
0.000419613
fluid dram
0.000104903
fluid ounce
0.000839226
cup
0.006713804
pint
0.013427609
quart
0.026855218
gallon
0.10742087
cubic inch
0.000465025
cubic foot
0.803563913
cubic yard
21.6962257
cubic mile
1.18283E+11
imperial ounce
0.000806295
imperial pint
0.016125892
imperial quart
0.032251785
imperial gallon
0.12900714
barrel (beer)
3.33004698
barrel (oil)
4.511676554
bushel
1
gill
0.003356902
imperial gill
0.004031473
peck
0.25
dry pint
0.015625
dry quart
0.03125
stere
28.3775918
liter
0.028377592
cubic meter
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.
Example
 
select wct.BUSHELS(1, 'quart')
Here is the result set
----------------------
0.0268552176
 
(1 row(s) affected)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service