I'm working on a program for my work and I'm trying to select multiple power line segments from the same shapefile. I'm having trouble with my SQL syntax to pass both variables on to the selection process in the program. I've tried both the 'or' and 'in' queries. The line of code worked with just one variable, but it still only passes one variable after I added the second one. Any suggestions?
import arcpy line_val1 = raw_input('Enter Line Number: ') line_val2 = raw_input('Enter Line Number: ') expression = str(""" "LINE_NUM_1" = '""" + line_val1 + "'" or """ "LINE_NUM_1" = '""" + line_val2 + "'") arcpy.SelectLayerByAttribute_management(line_out, "NEW_SELECTION", expression)