UnionAggregate (geography Data Type)
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Performs a union operation on a set of geography objects.
Syntax
UnionAggregate ( geography_operand )
Note
To view Transact-SQL syntax for SQL Server 2014 (12.x) and earlier versions, see Previous versions documentation.
Arguments
geography_operand
Is a geography type table column that holds the set of geography objects on which to perform a union operation.
Return Types
SQL Server return type: geography
Remarks
Method returns null if the input has different SRIDs. See Spatial Reference Identifiers (SRIDs).
Method ignores null inputs.
Note
Method returns null if all inputted values are null.
Examples
The following example performs a UnionAggregate
on a set of geography location points within a city.
USE AdventureWorks2022
GO
SELECT City,
geography::UnionAggregate(SpatialLocation) AS SpatialLocation
FROM Person.Address
WHERE PostalCode LIKE('981%')
GROUP BY City;
See Also
คำติชม
https://aka.ms/ContentUserFeedback
เร็วๆ นี้: ตลอดปี 2024 เราจะขจัดปัญหา GitHub เพื่อเป็นกลไกคำติชมสำหรับเนื้อหา และแทนที่ด้วยระบบคำติชมใหม่ สำหรับข้อมูลเพิ่มเติม ให้ดู:ส่งและดูข้อคิดเห็นสำหรับ