Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert volume to fluid drams


FLDRAMS
 
Updated: 01 December 2008 

Use FLDRAMS 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 fluid drams.
Syntax
SELECT [westclintech].[wct].[FLDRAMS] (
  <@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 fluid drams:
teaspoon
1.333333333
tablespoon
4
fluid dram
1
fluid ounce
8
cup
64
pint
128
quart
256
gallon
1024
cubic inch
4.43290044
cubic foot
7660.05196
cubic yard
206821.4024
cubic mile
1.12754E+15
imperial ounce
7.68608272
imperial pint
153.721654
imperial quart
307.443308
imperial gallon
1229.773232
barrel (beer)
31744
barrel (oil)
43008
bushel
9532.59824
gill
32
imperial gill
38.43041352
peck
2383.14956
dry pint
148.9468401
dry quart
297.8936804
stere
270512.1816
liter
270.5121816
cubic meter
270512.1816
 
·         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.FLDRAMS(1, 'quart')
Here is the result set
----------------------
256
 
(1 row(s) affected)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service