SQMILES
Updated 2023-11-08 20:59:36.497000
Syntax
SELECT [westclintech].[wct].[SQMILES] (
<@Area, float,>
,<@From_scale, nvarchar(4000),>)
Description
Use the scalar function SQMILES to convert from acres, hectares, square feet, square inches, square meters, square miles, or square yards to square miles.
Arguments
@Area
is any real number. @Area 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 @Area. @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.
Return Type
float
Remarks
The following table is a representation of the conversion of one of the area units of measure into square miles:
{"columns":[{"field":"column 1"},{"field":"column 2","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"acres","column 2":"0.00152625"},{"column 1":"square inches","column 2":"2.49098E-10"},{"column 1":"square feet","column 2":"3.58701E-08"},{"column 1":"square yards","column 2":"3.22831E-07"},{"column 1":"square miles","column 2":"1"},{"column 1":"square meters","column 2":"3.86102E-07"},{"column 1":"hectares","column 2":"0.003861022"}]}
Conversion of meters includes all the standard prefixes with kilo representing 1,000 and yocto representing 10E-24.
Examples
select wct.SQMILES(100, 'yd^2');
Here is the result set.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"3.22830578512397E-05"}]}