Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert volume to imperial gills


IMPGILLS
 
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 imperial gills.
Syntax
SELECT [westclintech].[wct].[IMPGILLS] (
  <@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.034694743
tablespoon
0.10408423
fluid dram
0.026021058
fluid ounce
0.20816846
cup
1.66534768
pint
3.33069536
quart
6.66139072
gallon
26.64556288
cubic inch
0.115348757
cubic foot
199.322652
cubic yard
5381.71161
cubic mile
2.93399E+13
imperial ounce
0.2
imperial pint
4
imperial quart
8
imperial gallon
32
barrel (beer)
826.01245
barrel (oil)
1119.113642
bushel
248.048287
gill
0.832674202
imperial gill
1
peck
62.0120718
dry pint
3.8757559
dry quart
7.7515118
stere
7039.01304
liter
7.03901304
cubic meter
7039.01304
 
·         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.IMPGILLS(1, 'quart')
Here is the result set
----------------------
6.66139072
 
(1 row(s) affected)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service