Skip to main content
added 4 characters in body
Source Link
Bera
  • 77.8k
  • 14
  • 78
  • 187

In place of the SQL wildcard %, use the Python string method startswith as below.

with arcpy.da.UpdateCursor(Zoning, ["ZONING", "ZONING_DESC"]) as cursor:
    for row in cursor:
        if row[0].startswith('PCD'):
            row[1] = 'Planned Commercial Development'
            cursor.updateRow(row)

In place of the SQL wildcard %, use the Python string method startswith as below.

with arcpy.da.UpdateCursor(Zoning, ["ZONING", "ZONING_DESC"]) as cursor:
    for row in cursor:
        if row[0].startswith('PCD'):
            row[1] = 'Planned Commercial Development'
        cursor.updateRow(row)

In place of the SQL wildcard %, use the Python string method startswith as below.

with arcpy.da.UpdateCursor(Zoning, ["ZONING", "ZONING_DESC"]) as cursor:
    for row in cursor:
        if row[0].startswith('PCD'):
            row[1] = 'Planned Commercial Development'
            cursor.updateRow(row)
missing line of code, spotted by @BERA
Source Link
SMiller
  • 3.7k
  • 10
  • 22

In place of the SQL wildcard %, use the Python string method startswith as below.

with arcpy.da.UpdateCursor(Zoning, ["ZONING", "ZONING_DESC"]) as cursor:
    for row in cursor:
        if row[0].startswith('PCD'):
            row[1] = 'Planned Commercial Development'
        cursor.updateRow(row)

In place of the SQL wildcard %, use the Python string method startswith as below.

with arcpy.da.UpdateCursor(Zoning, ["ZONING", "ZONING_DESC"]) as cursor:
    if row[0].startswith('PCD'):
        row[1] = 'Planned Commercial Development'
    cursor.updateRow(row)

In place of the SQL wildcard %, use the Python string method startswith as below.

with arcpy.da.UpdateCursor(Zoning, ["ZONING", "ZONING_DESC"]) as cursor:
    for row in cursor:
        if row[0].startswith('PCD'):
            row[1] = 'Planned Commercial Development'
        cursor.updateRow(row)
Source Link
SMiller
  • 3.7k
  • 10
  • 22

In place of the SQL wildcard %, use the Python string method startswith as below.

with arcpy.da.UpdateCursor(Zoning, ["ZONING", "ZONING_DESC"]) as cursor:
    if row[0].startswith('PCD'):
        row[1] = 'Planned Commercial Development'
    cursor.updateRow(row)