SQL Server 2012 の場合:
SELECT geometry::UnionAggregate(geomcolumn) FROM YourTable;
プレ>SQL Server 2008/R2 の場合:
DECLARE @g = geometry::STGeomFromText('GEOMETRYCOLLECTION EMPTY', YourSRID); SELECT @g = @g.STUnion(geomcolum) FROM YourTable;
プレ>
SQL Server 2012 の場合:
SELECT geometry::UnionAggregate(geomcolumn) FROM YourTable;
プレ>SQL Server 2008/R2 の場合:
DECLARE @g = geometry::STGeomFromText('GEOMETRYCOLLECTION EMPTY', YourSRID); SELECT @g = @g.STUnion(geomcolum) FROM YourTable;
プレ>