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

How to use +"AND"+?

$
0
0
I am trying to get the records with 1 or 2 in field A, and at the same time 3 or 4 in field B.
When constructing the whereclause
I used:
"import arcpy
arcpy.SelectLayerByAttribute_management("streets","NEW_SELECTION",'"A"=\'1\'or"FieldA"=\'2\'+"AND"+'"B"=\'3\'or"B"=\'4\'')

But the result was not what I intended. Where did I go wrong?
Thanks.
Best

Viewing all articles
Browse latest Browse all 2485

Trending Articles