Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT * FROM FeatureClass WHERE Field IN ('a', 'f', 'l')
- gRoutes = ('R10T', 'R10TBP', 'R10TWP', 'R20T', 'R20TBP', 'R20TWP', 'R32T', 'R32TBP', 'R32TWP', 'R45T', 'R45TBY', 'R45TBP', 'R45TWP', 'R64T', 'R64TBP', 'R64TWP', 'R96T', 'R96TBP', 'R96TWP', 'R10TBY', 'R20TBY', 'R32TBY', 'R64TBY', 'R96TBY')
- # field name
- QF1 = "Product_Code"
- WC1 = '"' + QF1 + '" IN ' + "'" + gRoutes + "'"
- arcpy.SelectLayerByAttribute_management("layerFC","REMOVE_FROM_SELECTION", WC1)
- '"Product_Code" IN '['R10T', 'R10TBP', 'R10TWP', 'R20T', 'R20TBP', 'R20TWP', 'R32T', 'R32TBP', 'R32TWP', 'R45T', 'R45TBY', 'R45TBP', 'R45TWP', 'R64T', 'R64TBP', 'R64TWP', 'R96T', 'R96TBP', 'R96TWP', 'R10TBY', 'R20TBY', 'R32TBY', 'R64TBY', 'R96TBY']''
- Start Time: Thu Oct 20 14:59:48 2016
- ERROR 000358: Invalid expression
- Failed to execute (SelectLayerByAttribute).
- Failed at Thu Oct 20 14:59:48 2016 (Elapsed Time: 0.02 seconds)
- gRoutes = '('R10T', 'R10TBP', 'R10TWP', 'R20T', 'R20TBP', 'R20TWP', 'R32T', 'R32TBP', 'R32TWP', 'R45T', 'R45TBY', 'R45TBP', 'R45TWP', 'R64T', 'R64TBP', 'R64TWP', 'R96T', 'R96TBP', 'R96TWP', 'R10TBY', 'R20TBY', 'R32TBY', 'R64TBY', 'R96TBY')'
- # field name
- QF1 = '"Product_Code"'
- WC1 = QF1 + ' IN ' + gRoutes
- arcpy.SelectLayerByAttribute_management("layerFC","REMOVE_FROM_SELECTION", WC1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement