Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert area to square miles


SQMILES
 
Updated: 01 December 2008 

Use SQMILES to convert from acres, hectares, square feet, square inches, square meters, square miles, or square yards to square miles.
Syntax
SELECT [westclintech].[wct].[SQMILES] (
  <@Area, float,>
 ,<@From_scale, nvarchar(4000),>)
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 Types
float
Remarks
·         The following table is a representation of the conversion of one of the area units of measure into square miles:
acres
0.00152625
square inches
2.49098E-10
square feet
3.58701E-08
square yards
3.22831E-07
square miles
1
square meters
3.86102E-07
hectares
0.003861022
 
·         Conversion of meters includes all the standard prefixes with kilo representing 1,000 and yocto representing 10E-24.
Example
 
select wct.SQMILES(100, 'yd^2')
Here is the result set
----------------------
3.22830578512397E-05
 
(1 row(s) affected)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service