Logo

SQL Server INSEC Function

Updated 2023-11-09 14:39:32.980000

Description

Use the scalar function INSEC 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 inches per second.

Syntax

SELECT [westclintech].[wct].[INSEC] (
  <@Speed, float,>
 ,<@From_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.

Return Type

float

Remarks

The following table is a representation of the conversion of one of the speed units of measure into inches per second:

column 1column 2
feet per hour0.003333
feet per minute0.2
feet per second12
inches per second1
kilometers per hour10.93613
knots20.25372
miles per hour17.6
miles per minute1056
miles per second63360
meters per second39.37008
meters per minute0.656168
meters per hour0.010936

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

Examples

select wct.INSEC(10, 'm/s');

Here is the result set.

column 1
393.700787