yo_haha

Delete feature class rows

Discussion created by yo_haha on Feb 4, 2013
Hi,

I have a feature class, fc, in a SDE geodatabase. I'm trying to delete rows from this feature class that have the field f1 equal to the model parameter, param = GetParameterAsText(0)
So I developed the code below:
rows = UpdateCursor("fc", "f1 = %s" % param, "", "", "") 

for row in rows: 
    rows.deleteRow(row)
del rows

But this does not delete rows that have f1 = param. Instead, it changes f1 of all the rows in fc to param.
Am I doing something wrong?

Regards.

Outcomes