Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

arcpy.select invalid sql statement

$
0
0
Hi

The following script is giving a syntax errror on the arcpy.Select line.
I've tried various combinations of Quotes but I still get the invalid sql statement.
Any ideas?

# Import arcpy module
import arcpy
# Local variables:
PropertyNew = "M:\\GIS\\KMZ Irrigation East\\PropertyNew.shp"
OwnerPropertyShp = "M:\\GIS\\KMZ Irrigation East\\OwnerProperty.shp"
# Process: Select
arcpy.Select_analysis(PropertyNew, OwnerPropertyShp, "[PARCEL_SPI] = '2003\\PP2679'")

Traceback (most recent call last):
File "M:\GIS\KMZ Irrigation East\owner.py", line 19, in <module>
arcpy.Select_analysis(PropertyNew, OwnerPropertyShp, "[PARCEL_SPI] = '2003\\PP2679'")
File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\analysis.py", line 88, in Select
raise e
ExecuteError: ERROR 999999: Error executing function.
An invalid SQL statement was used.
An invalid SQL statement was used.
Failed to execute (Select).

Viewing all articles
Browse latest Browse all 2485

Trending Articles