Export (0) Print
Expand All

UnionAggregate (geography Data Type)

 

Applies To: SQL Server 2014, SQL Server 2016 Preview

Performs a union operation on a set of geography objects.

Applies to: SQL Server (SQL Server 2012 through current version), Azure SQL Database.


UnionAggregate ( geography_operand )

geography_operand

Is a geography type table column that holds the set of geography objects on which to perform a union operation.

SQL Server return type: geography

Method returns null if the input has different SRIDs. See Spatial Reference Identifiers (SRIDs).

Method ignores null inputs.

System_CAPS_noteNote

Method returns null if all inputted values are null.

The following example performs a UnionAggregate on a set of geography location points within a city.

USE AdventureWorks2012

GO

SELECT City,

geography::UnionAggregate(SpatialLocation) AS SpatialLocation

FROM Person.Address

WHERE PostalCode LIKE('981%')

GROUP BY City;

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft