Skip to content

Instantly share code, notes, and snippets.

@geographika
Created December 19, 2010 12:13
Show Gist options
  • Save geographika/747294 to your computer and use it in GitHub Desktop.
Save geographika/747294 to your computer and use it in GitHub Desktop.
A SQL statement to assign points a polygon ID
UPDATE child SET ParentId = parent.FID
FROM ChildTableName child
,ParentTableName parent
WHERE ChildTableName.GEOM.STWithin(parent.GEOM) = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment