Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert volume to teaspoons


TEASPOONS
 
Updated: 01 December 2008 

Use TEASPOONS 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 teaspoons.
Syntax
SELECT [westclintech].[wct].[TEASPOONS] (
  <@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 teaspoons:
teaspoon
1
tablespoon
3
fluid dram
0.75
fluid ounce
6
cup
48
pint
96
quart
192
gallon
768
cubic inch
3.3246753
cubic foot
5745.039
cubic yard
155116.05
cubic mile
8.457E+14
imperial ounce
5.764562
imperial pint
115.29124
imperial quart
230.58248
imperial gallon
922.32992
barrel (beer)
23808
barrel (oil)
32256
bushel
7149.4487
gill
24
imperial gill
28.822798
peck
1787.3622
dry pint
111.71013
dry quart
223.42026
stere
202884.14
liter
202.88414
cubic meter
202884.14
 
·         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.TEASPOONS(1, 'quart')
Here is the result set
----------------------
192
 

(1 row(s) affected)



Copyright 2008-2013 WestClinTech LLC         Privacy Policy        Terms of Service