MHR
Updated: 01 December 2008
Use MHR 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 hour.
Syntax
SELECT [westclintech].[wct].[MHR] (
<@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 hour, @To_scale can be decimeters per hour, centimeters per hour, millimeters per hour, micrometers per hour, nanometers per hour, picometers per hour, femtometers per hour, attometers per hour, zeptometers per hour, yoctometers per hour, decameters per hour, hectometers per hour, or kilometers per hour .@To_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 speed units of measure into meters per hour:
feet per hour
|
0.3048
|
feet per minute
|
18.288
|
feet per second
|
1097.28
|
inches per second
|
91.44
|
kilometers per hour
|
1000
|
knots
|
1852
|
miles per hour
|
1609.344
|
miles per minute
|
96560.64
|
miles per second
|
5793638
|
meters per second
|
3600
|
meters per minute
|
60
|
meters per hour
|
1
|
· Conversion of meters includes all the standard prefixes with kilo representing 1,000 and yocto representing 10E-24.
Example
select wct.MHR(10, 'm/s', 'km/h')
Here is the result set
----------------------
36
(1 row(s) affected)