Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert volume to quarts


QUARTS
 
Updated: 01 December 2008 

Use QUARTS 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 quarts.
Syntax
SELECT [westclintech].[wct].[QUARTS] (
  <@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 quarts:
teaspoon
0.005208333
tablespoon
0.015625
fluid dram
0.00390625
fluid ounce
0.03125
cup
0.25
pint
0.5
quart
1
gallon
4
cubic inch
0.017316017
cubic foot
29.9220779
cubic yard
807.896104
cubic mile
4.40447E+12
imperial ounce
0.030023761
imperial pint
0.600475211
imperial quart
1.20095042
imperial gallon
4.80380169
barrel (beer)
124
barrel (oil)
168
bushel
37.2367119
gill
0.125
imperial gill
0.150118803
peck
9.30917797
dry pint
0.581823594
dry quart
1.163647189
stere
1056.68821
liter
1.05668821
cubic meter
1056.68821
 
·         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.QUARTS(1, 'quart')
Here is the result set
----------------------
1
 
(1 row(s) affected)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service