Skip to content

Instantly share code, notes, and snippets.

@juan-fdz-hawa
Created May 11, 2016 16:16
Show Gist options
  • Save juan-fdz-hawa/74db0d536ff1d13836f3df1565b1ae22 to your computer and use it in GitHub Desktop.
Save juan-fdz-hawa/74db0d536ff1d13836f3df1565b1ae22 to your computer and use it in GitHub Desktop.
SELECT
geometry::UnionAggregate (Boundaries).STEnvelope().STPointN(1).STX as xmin,
geometry::UnionAggregate (Boundaries).STEnvelope().STPointN(3).STX as xmax,
geometry::UnionAggregate (Boundaries).STEnvelope().STPointN(1).STY as ymin,
geometry::UnionAggregate (Boundaries).STEnvelope().STPointN(3).STY as ymax
FROM [GIS].[BOUNDARIES].[PoliceTownsAndVillages]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment