Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert volume to cubic feet


CUFEET
 
Updated: 01 December 2008 

Use CUFEET 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 cubic feet.
Syntax
SELECT [westclintech].[wct].[CUFEET] (
  <@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 cubic feet:
teaspoon
0.000174063
tablespoon
0.000522190
fluid dram
0.000130547
fluid ounce
0.001044379
cup
0.008355035
pint
0.016710069
quart
0.033420139
gallon
0.133680556
cubic inch
0.000578704
cubic foot
1
cubic yard
27
cubic mile
1.47198E+11
imperial ounce
0.001003398
imperial pint
0.020067965
imperial quart
0.04013593
imperial gallon
0.16054372
barrel (beer)
4.144097222
barrel (oil)
5.614583333
bushel
1.24445608
gill
0.004177517
imperial gill
0.005016991
peck
0.311114021
dry pint
0.019444625
dry quart
0.038889251
stere
35.3146667
liter
0.035314667
cubic meter
35.3146667
 
·         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.CUFEET(1, 'quart')
Here is the result set
----------------------
0.0334201389
 
(1 row(s) affected)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service