Logo

SQL Server GILLS Function

Updated 2023-11-09 16:15:34.677000

Description

Use the scalar function GILLS 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 gills.

Syntax

SELECT [westclintech].[wct].[GILLS] (
  <@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 gills:

column 1column 2
teaspoon0.04166667
tablespoon0.125
fluid dram0.03125
fluid ounce0.25
cup2
pint4
quart8
gallon32
cubic inch0.1385281
cubic foot239.3765568
cubic yard6463.167034
cubic mile3.52357E+13
imperial ounce0.24019
imperial pint4.8038
imperial quart9.6076
imperial gallon38.4304
barrel (beer)992
barrel (oil)1344
bushel297.8936804
gill1
imperial gill1.2009499
peck74.4734201
dry pint4.6545888
dry quart9.3091776
stere8453.50564
liter8.45350564
cubic meter8453.50564

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

Here is the result set.

column 1
8