Logo

SQL Server MMIN Function

Updated 2023-11-09 14:52:36.980000

Description

Use the scalar function MMIN to convert from feet per hour, feet per minute, feet per second, inches per second, kilometers per hour, knots, miles per hour, miles per minute, miles per second, meters per second, meters per minute or meters per hour to meters per minute.

Syntax

SELECT [westclintech].[wct].[MMIN] (
  <@Speed, float,>
 ,<@From_scale, nvarchar(4000),>
 ,<@To_scale, nvarchar(4000),>)

Arguments

@Speed

is any real number. @Speed 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 @Speed. @From_scale must be a valid value as specified in speed unit representations. @From_scale must be of a data type that is implicitly convertible to varchar.

@To_scale

is the description of the metric units that @Speed is to be converted into. @To_scale must be a valid value as specified in speed unit representations. In addition to meters per minute, @To_scale  can be decimeters per minute, centimeters per minute, millimeters per minute, micrometers per minute, nanometers per minute, picometers per minute, femtometers per minute, attometers per minute, zeptometers per minute, yoctometers per minute, decameters per minute, hectometers per minute or kilometers per minute. @To_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 speed units of measure into meters per minute:

column 1column 2
feet per hour0.00508
feet per minute0.3048
feet per second18.288
inches per second1.524
kilometers per hour16.66667
knots30.86667
miles per hour26.8224
miles per minute1609.344
miles per second96560.64
meters per second60
meters per minute1
meters per hour0.016667

Conversion of meters includes all the standard prefixes with kilo representing 1,000 and yocto representing 10E-24.

Examples

select wct.MMIN(10, 'm/s', 'km/min');

Here is the result set.

column 1
0.6