Select to view content in your preferred language

Scripting a definition query

1010
3
11-30-2010 04:36 AM
JoeyDiehl
Deactivated User
I am working with a line and polygon feature class. I am wondering how I would use a definition query to only show polygons(Parcels) which are intersected by my line(Pipeline) layer. Can someone please help me? Any help on this would be greatly appreciated.
0 Kudos
3 Replies
MichaelBranscomb
Esri Frequent Contributor
Hi,

- If you are using the UI:

See the Query tool (http://webhelp.esri.com/arcgisexplorer/1500//en/query_editor.htm)

- If you are developing an Add-in:

See the FeatureLayer.QueryDefinition property (http://help.arcgis.com/en/arcgisexplorer/1500/sdk/componenthelp/index.html#/QueryDefinition_Property...).

Regards

Mike
0 Kudos
JoeyDiehl
Deactivated User
Mike,

What I am trying do do is enter a script into the defintion query box such as

objectid IN (SELECT
   s.objectid
FROM
   sde_FBRW.FBRWSADMIN.Parcel_Boundaries s,
sde_FBRW_Design.FBDESIGNADMIN.Mandaree_Pipeline t
WHERE
   t.CLASS = '160'
AND
    ST_Intersects(s.shape, t.shape) = 1)


I am working in 9.3.1 and I cant figure out the correct syntax. Any further help would be greatly appreciated. Thanks!
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

When you say 9.3.1 - do you mean you're working in ArcGIS Desktop (i.e. ArcMap / ArcCatalog)? If so, try posting your question in the ArcGIS Desktop forums (http://forums.arcgis.com/forums/5-ArcGIS-Desktop-General).

Regards

Mike
0 Kudos