Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert volume to us beer barrels


BBLS
 
Updated: 01 December 2008 

Use BBL 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 bbls.
Syntax
SELECT [westclintech].[wct].[BBLS] (
  <@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 bbls:
teaspoon
3.1002E-05
tablespoon
9.3006E-05
fluid dram
2.3251E-05
fluid ounce
0.00018601
cup
0.0014881
pint
0.00297619
quart
0.00595238
gallon
0.02380952
cubic inch
0.00010307
cubic foot
0.17810761
cubic yard
4.80890538
cubic mile
2.6217E+10
imperial ounce
0.00017871
imperial pint
0.00357426
imperial quart
0.00714851
imperial gallon
0.02859406
barrel (beer)
0.73809524
barrel (oil)
1
bushel
0.22164709
gill
0.00074405
imperial gill
0.00089356
peck
0.05541177
dry pint
0.00346324
dry quart
0.00692647
stere
6.28981077
liter
0.00628981
cubic meter
6.28981077
 
·         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.BBLS(1, 'quart')
Here is the result set
----------------------
0.00595238095238095
 
(1 row(s) affected)


Copyright 2008-2017 Westclintech LLC         Privacy Policy        Terms of Service