Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert volume to cubic inches


CUINCHES
 
Updated: 01 December 2008 

Use CUINCHES 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 inches.
Syntax
SELECT [westclintech].[wct].[CUINCHES] (
  <@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 inches:
teaspoon
0.30078125
tablespoon
0.90234375
fluid dram
0.225585938
fluid ounce
1.8046875
cup
14.4375
pint
28.875
quart
57.75
gallon
231
cubic inch
1
cubic foot
1728
cubic yard
46656
cubic mile
2.54358E+14
imperial ounce
1.73387217
imperial pint
34.6774434
imperial quart
69.3548869
imperial gallon
277.419547
barrel (beer)
7161
barrel (oil)
9702
bushel
2150.42011
gill
7.21875
imperial gill
8.66936086
peck
537.605028
dry pint
33.60031257
dry quart
67.20062517
stere
61023.7441
liter
61.0237441
cubic meter
61023.7441
 
·         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.CUINCHES(1, 'quart')
Here is the result set
----------------------
57.75
 
(1 row(s) affected)


Copyright 2008-2013 WestClinTech LLC         Privacy Policy        Terms of Service