Logo

SQL Server TABLESPOONS Function

Updated 2023-11-09 16:30:00.867000

Description

Use the scalar function 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 Type

float

Remarks

The following table is a representation of the conversion of one of the volume units of measure into tablespoons:

column 1column 2
teaspoon0.333333333
tablespoon1
fluid dram0.25
fluid ounce2
cup16
pint32
quart64
gallon256
cubic inch1.10822511
cubic foot1915.01299
cubic yard51705.3506
cubic mile2.81886E+14
imperial ounce1.92152068
imperial pint38.4304135
imperial quart76.860827
imperial gallon307.443308
barrel (beer)7936
barrel (oil)10752
bushel2383.14956
gill8
imperial gill9.60760338
peck595.78739
dry pint37.23671003
dry quart74.4734201
stere67628.0454
liter67.6280454
cubic meter67628.0454

Conversion of metric values (liters and cubic meters) includes all the standard prefixes with kilo representing 1,000 and yocto representing 10E-24.

Examples

select wct.TABLESPOONS(1, 'quart');

Here is the result set.

column 1
64