Logo

SQL Server FATHOMS Function

Updated 2023-11-09 14:06:13.677000

Description

Use the scalar function FATHOMS to convert from fathoms, feet, furlongs, inches, meters, miles, nautical miles, pica, points or yards to fathoms.

Syntax

SELECT [westclintech].[wct].[FATHOMS] (
  <@Length, float,>
 ,<@From_scale, nvarchar(4000),>)

Arguments

@Length

is any real number. @Length 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 @Length. @From_scale must be a valid value as specified in length 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 length units of measure into fathoms:

column 1column 2
inches0.0138888889
feet0.1666666670
yards0.5000000000
meters0.5468066490
fathoms1.0000000000
furlongs110.0000000000
miles880.0000000000
nautical miles1012.6859100000
pica0.0023148148
points0.0001929

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

Examples

select wct.FATHOMS(100, 'yd');

Here is the result set.

column 1
50