Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert area units of measure


CONVERTAREA
 
Updated: 01 December 2008
Use CONVERTAREA to convert to and from acres, hectares, square feet, square inches, square meters, square miles, or square yards.
Syntax
SELECT [westclintech].[wct].[CONVERTAREA] (
  <@Area, float,>
 ,<@From_scale, nvarchar(4000),>
 ,<@To_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 @Area 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.
 
@To_scale
is the description of the units @Area 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
float
Remarks
acre
acre, acres
square inches
in^2, sq in, sq ins, square inch, square inches
square feet
ft^2, sq ft, square foot, square feet
square yards
yd^2, sq yd, sq yds, square yard, square yards
square miles
mi^2, sq mi, sq mis, square mile, square miles
square meters
m^2, sq m, sq ms, square meter, square meters, square metre, square metres
square decimeters
dm^2, sq dm, sq dms, square decimeter, square decimeters, square decimetre, square decimeters
square centimeters
cm^2, sq cm, sq cms, square centimeter, square centimeters, square centimetre, square centimeters
square millimeters
mm^2, sq mm, sq mms, square millimeter, square millimeters, square millimetre, square millimeters
square microns
µm^2, sq µm, sq µms, square micron, square micron
square nanometers
nm^2, sq nm, sq nms, square nanometer, square nanometers, square nanometre, square nanometers
square picometers
pm^2, sq pm, sq pms, square picometer, square picometers, square picometre, square picometres
square femtometers
fm^2, sq fm, sq fms, square femtometer, square femtometers, square femtometre, square femtometres
square attometers
am^2, sq am, sq ams, square attometer, square attometers, square attometre, square attometres
square zeptometers
zm^2, sq zm, sq zms, square zeptometer, square zeptometers, square zeptometre, square zeptometres
square yoctometers
ym^2, sq ym, sq yms, square yoctometer, square yoctometers, square yoctometre, square yoctometres
square decameters
dam^2, sq dam, sq dams, square decameter, square decameters, square decametre, square decameters
square hectometers
, hm^2, sq hm, sq hms, square hectometer, square hectometers, square hectometre, square hectometres
square kilometers
km^2, sq km, sq kms, square kilometer, square kilometers, square kilometre, square kilometres
hectares
ha, hectare, hectares   
 
Example
 
select wct.CONVERTAREA(1, 'acre', 'ft^2')
Here is the result set
----------------------
43560
 

(1 row(s) affected)



Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service