Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert speed units of measure

Updated: 01 December 2008

Use CONVERTSPEED to convert to and 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.
SELECT [westclintech].[wct].[CONVERTSPEED] (
  <@Speed, float,>
 ,<@From_scale, nvarchar(4000),>
 ,<@To_scale, nvarchar(4000),>)
is any real number. @Speed is an expression of type float or of a type that can be implicitly converted to float
is the description of the units @Speed is being converted from. @From_scale must be a valid value as specified in area unit representations. @From_scale must be of a data type that is implicitly convertible to varchar.
is the description of the units @Speed is being converted to. @To_scale must be a valid value as specified in area unit representations. @To_scale must be of a data type that is implicitly convertible to varchar.
Return Types
feet per hour
ft/h, feet per hour, foot per hour, fph, ft·h
feet per minute
ft/min, feet per minute, foot per minute, fpm, ft·m
feet per second
ft/s, feet per second, foot per second, fps, ft·s
inches per second
in/s, inches per second, inch per second, ips, in·s
kilometers per hour
km/h, kilometers per hour, kilometer per hour, kph, km·h
knot, knots
miles per hour
mi/h, miles per hour, mile per hour, mph, mi·h
miles per minute
mi/min, miles per minute, mile per minute, mpm, mi·m
miles per second
mi/s, miles per second, mile per second, mi·s
meters per second
m/s, meters per second, meter per second, mps, m·s
decimeters per second
dm/s, decimeters per second, decimeter per second, dmps, dm·s
centimeters per second
cm/s, centimeters per second, centimeter per second, cmps, cm·s
millimeters per second
mm/s, millimeters per second, millimeter per second, mmps, mm·s
microns per second
µm/s, microns per second, micron per second, µmps, µm·s
nanometers per second
nm/s, nanometers per second, nanometer per second, nmps, nm·s
picometers per second
pm/s, picometers per second, picometer per second, pmps, pm·s
femtometers per second
fm/s, femtometers per second, femtometer per second, fmps, fm·s
attometers per second
am/s, attometers per second, attometer per second, amps, am·s
zeptometers per second
zm/s, zeptometers per second, zeptometer per second, zmps, zm·s
yoctometers per second
ym/s, yoctometers per second, yoctometer per second, ymps, ym·s
decameters per second
dam/s, decameters per second, decameter per second, damps, dam·s
hectometers per second
hm/s, hectometers per second, hectometer per second, hmps, hm·s
kilometers per second
km/s, kilometers per second, kilometer per second, kmps, km·s
meters per minute
m/min, meters per minute, meter per minute, m·min
decimeters per minute
dm/min, decimeters per minute, decimeter per minute, dmpm, dm·min
centimeters per minute
cm/min, centimeters per minute, centimeter per minute, cmpm, cm·min
millimeters per minute
mm/min, millimeters per minute, millimeter per minute, mmpm, mm·min
microns per minute
µm/min, microns per minute, micron per minute, µmpm, µm·min
nanometers per minute
nm/min, nanometers per minute, nanometer per minute, nmpm, nm·min
picometers per minute
pm/min, picometers per minute, picometer per minute, pmpm, pm·min
femtometers per minute
fm/min, femtometers per minute, femtometer per minute, fmpm, fm·min
attometers per minute
am/min, attometers per minute, attometer per minute, ampm, am·min
zeptometers per minute
zm/min, zeptometers per minute, zeptometer per minute, zmpm, zm·min
yoctometers per minute
ym/min, yoctometers per minute, yoctometer per minute, ympm, ym·min
decameters per minute
dam/min, decameters per minute, decameter per minute, dampm, dam·min
hectometers per minute
hm/min, hectometers per minute, hectometer per minute, hmpm, hm·min
kilometers per minute
km/min, kilometers per minute, kilometer per minute, kmpm, km·min
meters per hour
m/h, meters per hour, meter per hour, m·h
decimeters per hour
dm/h, decimeters per hour, decimeter per hour, dmph, dm·h
centimeters per hour
cm/h, centimeters per hour, centimeter per hour, cmph, cm·h
millimeters per hour
mm/h, millimeters per hour, millimeter per hour, mmph, mm·h
microns per hour
µm/h, microns per hour, micron per hour, µmph, µm·h
nanometers per hour
nm/h, nanometers per hour, nanometer per hour, nmph, nm·h
picometers per hour
pm/h, picometers per hour, picometer per hour, pmph, pm·h
femtometers per hour
fm/h, femtometers per hour, femtometer per hour, fmph, fm·h
attometers per hour
am/h, attometers per hour, attometer per hour, amph, am·h
zeptometers per hour
zm/h, zeptometers per hour, zeptometer per hour, zmph, zm·h
yoctometers per hour
ym/h, yoctometers per hour, yoctometer per hour, ymph, ym·h
decameters per hour
dam/h, decameters per hour, decameter per hour, damph, dam·h
hectometers per hour
hm/h, hectometers per hour, hectometer per hour, hmph, hm·h 'metric per hour
select wct.CONVERTSPEED(3 * power(10, 8), 'm/s', 'mi/s')
Here is the result set
(1 row(s) affected)

Copyright 2008-2013 WestClinTech LLC         Privacy Policy        Terms of Service