Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert volume to tablespoons


wct.TABLESPOONS
 
Updated: 01 December 2008 

Use TABLESPOONS 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 tablespoons.
Syntax
SELECT [westclintech].[wct].[TABLESPOONS] (
  <@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 tablespoons:
teaspoon
0.333333333
tablespoon
1
fluid dram
0.25
fluid ounce
2
cup
16
pint
32
quart
64
gallon
256
cubic inch
1.10822511
cubic foot
1915.01299
cubic yard
51705.3506
cubic mile
2.81886E+14
imperial ounce
1.92152068
imperial pint
38.4304135
imperial quart
76.860827
imperial gallon
307.443308
barrel (beer)
7936
barrel (oil)
10752
bushel
2383.14956
gill
8
imperial gill
9.60760338
peck
595.78739
dry pint
37.23671003
dry quart
74.4734201
stere
67628.0454
liter
67.6280454
cubic meter
67628.0454
 
·         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.TABLESPOONS(1, 'quart')
Here is the result set
----------------------
64
 
(1 row(s) affected)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service