共用方式為


UnionAggregate (geography 資料類型)

在一組地理物件上執行聯集作業。

適用於:SQL Server (SQL Server 2012 透過目前版本)、Windows Azure SQL 資料庫 (初始版本,透過目前版本)。

語法

UnionAggregate ( geography_operand )

引數

  • geography_operand
    這是 geography 類型資料表資料行,可保留要在其上執行聯集作業的一組 geography 物件。

傳回類型

SQL Server 傳回類型:geography

備註

如果輸入具有不同的 SRID,方法會傳回 null。 請參閱<空間參考識別碼 (SRID)>。

方法會忽略 null 輸入。

注意

如果所有輸入的值為 null,方法會傳回 null。

範例

下列範例會在城市內的一組 geography 位置點上執行 UnionAggregate。

USE AdventureWorks2012

GO

SELECT City,

geography::UnionAggregate(SpatialLocation) AS SpatialLocation

FROM Person.Address

WHERE PostalCode LIKE('981%')

GROUP BY City;

請參閱

其他資源

擴充的靜態地理方法