ArcGIS 10.2 SDE Create a view of one feature based on another

2827
10
10-10-2013 12:04 PM
NathanOgden
New Contributor III
I'm new to this so please bear with me.

I saw this cool feature new -> view in ArcCatalog when I right clicked on my database.  I immediately created a view with the sql statement select * from Temp.DBO.NTS_50k where NTS50K = '72E16' and it worked perfectly.

I got to thinking wouldn't it be great if I could create a view of one dataset based on its intersection with another.  That would sure save me a lot of time and not affect my original data.  Can anyone tell me how to create (or if it is possible to create) such a query to make a view where one dataset is a subset of features which intersect another feature found in a geodatabase.

I'm looking for parcels which intersect my county's boundary.  Similar to Select by Location if possible.

Layers Temp.DBO.Parcels, Temp.DBO.CountyBoundary
SQL Server 2012 Std
ArcGIS Server Enterprise 10.2
ArcCatalog 10.2
0 Kudos
10 Replies
VinceAngelo
Esri Esteemed Contributor
Look at the examples in the Microsoft documentation for their implementation use
paradigm.  The STIntersects method is a property of the geometry column, so the
WHERE clause should look like
WHERE geometrycolumnname.STIntersects( someothergeometry )


The function itself returns Boolean (nulls allowed), but getting the geometry out of
another table (which of course my have the same SRID) and into that function is
likely going to be the trick, since I've never seen a subselect inside parenthesis
(though it certainly wouldn't hurt to try).

- V
0 Kudos