Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert volume to dry quarts


DRYQUARTS
 
Updated: 01 December 2008 

Use DRYQUARTS 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 dry quarts.
Syntax
SELECT [westclintech].[wct].[DRYQUARTS] (
  <@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 dry quarts:
teaspoon
0.004476
tablespoon
0.013428
fluid dram
0.003357
fluid ounce
0.026855
cup
0.214841
pint
0.429682
quart
0.859363
gallon
3.437453
cubic inch
0.014881
cubic foot
25.71405
cubic yard
694.2793
cubic mile
3.79E+12
imperial ounce
0.025801
imperial pint
0.516028
imperial quart
1.032056
imperial gallon
4.128224
barrel (beer)
106.561
barrel (oil)
144.373
bushel
32
gill
0.107421
imperial gill
0.129007
peck
8
dry pint
0.5
dry quart
1
stere
908.083
liter
0.908083
cubic meter
908.083
 
·         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.DRYQUARTS(1, 'quart')
Here is the result set
----------------------
0.8593632
 
(1 row(s) affected)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service