yunkex

How to use +"AND"+?

Discussion created by yunkex on Jul 15, 2013
Latest reply on Jul 15, 2013 by rzufelt
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

Outcomes