Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert volume to imperial quarts


IMPQUARTS
 
Updated: 01 December 2008 

Use IMPQUARTS 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 imperial quarts.
Syntax
SELECT [westclintech].[wct].[IMPQUARTS] (
  <@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 imperial quarts:
teaspoon
0.004336843
tablespoon
0.013010529
fluid dram
0.003252632
fluid ounce
0.026021058
cup
0.20816846
pint
0.41633692
quart
0.83267384
gallon
3.33069536
cubic inch
0.014418595
cubic foot
24.9153315
cubic yard
672.713952
cubic mile
3.66749E+12
imperial ounce
0.025
imperial pint
0.5
imperial quart
1
imperial gallon
4
barrel (beer)
103.251556
barrel (oil)
139.8892049
bushel
31.0060359
gill
0.10408423
imperial gill
0.125
peck
7.751508975
dry pint
0.48446931094
dry quart
0.96893862188
stere
879.87663
liter
0.87987663
cubic meter
879.87663
 
·         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.IMPQUARTS(1, 'quart')
Here is the result set
----------------------
0.83267384
 
(1 row(s) affected)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service