flederfauz

SQL Query

Discussion created by flederfauz on Jun 2, 2011
Latest reply on Jun 5, 2011 by kimo
Hi!

I ve problems with a sql expression. I want to select one row of a 1st lyr file attribute table in order to only select those features from a2nd lyr file intersecting with the 1lyr selected feature.
I tried all kind of expressions: "" ,"/", etc. but it keeps telling me either the expression is wrong or it doesn't make any selection. Any ideas?
Thi is the part of code keeping troubleing me

rows = arcpy.SearchCursor(MU)
for row in rows:
    x=row.OBJECTID
    whereClause="[OBJECTID] = "+str(x)
    arcpy.SelectLayerByAttribute_management (lyrFile, "NEW_SELECTION", whereClause)
    arcpy.SelectLayerByLocation_management(lyrFile2, "intersect", selectFeatures)

Outcomes