Logo

SQL Server BBLS Function

Updated 2023-11-09 15:29:24.520000

Description

Use the scalar 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 Type

float

Remarks

The following table is a representation of the conversion of one of the volume units of measure into bbls:

column 1column 2
teaspoon3.1002E-05
tablespoon9.3006E-05
fluid dram2.3251E-05
fluid ounce0.00018601
cup0.0014881
pint0.00297619
quart0.00595238
gallon0.02380952
cubic inch0.00010307
cubic foot0.17810761
cubic yard4.80890538
cubic mile2.6217E+10
imperial ounce0.00017871
imperial pint0.00357426
imperial quart0.00714851
imperial gallon0.02859406
barrel (beer)0.73809524
barrel (oil)1
bushel0.22164709
gill0.00074405
imperial gill0.00089356
peck0.05541177
dry pint0.00346324
dry quart0.00692647
stere6.28981077
liter0.00628981
cubic meter6.28981077

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

Here is the result set.

column 1
0.00595238095238095