Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert volume to gills


GILLS
 
Updated: 01 December 2008 

Use 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 Types
float
Remarks
·         The following table is a representation of the conversion of one of the volume units of measure into gills:
teaspoon
0.04166667
tablespoon
0.125
fluid dram
0.03125
fluid ounce
0.25
cup
2
pint
4
quart
8
gallon
32
cubic inch
0.1385281
cubic foot
239.3765568
cubic yard
6463.167034
cubic mile
3.52357E+13
imperial ounce
0.24019
imperial pint
4.8038
imperial quart
9.6076
imperial gallon
38.4304
barrel (beer)
992
barrel (oil)
1344
bushel
297.8936804
gill
1
imperial gill
1.2009499
peck
74.4734201
dry pint
4.6545888
dry quart
9.3091776
stere
8453.50564
liter
8.45350564
cubic meter
8453.50564
 
·         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.GILLS(1, 'quart')
Here is the result set
----------------------
8
 
(1 row(s) affected)


Copyright 2008-2017 Westclintech LLC         Privacy Policy        Terms of Service