Using SearchCursor for NULL values

Discussion created by Xhosa on Jun 21, 2013
Latest reply on Jul 3, 2013 by Xhosa
I am trying to use the search cursor to find all null values within a table but am having a hard time with the where-clause statement. How do i search for null values using searchcursor?

I have a small example of what I am trying to do:

import arcpy

in_workspace = r"C:/data
fields = ["A", "B", "C", "D", "E", "F", "G"]
where = fields = "None"

for dirpath, dirnames, filenames in arcpy.da.Walk(in_workspace, datatype="featureclass", type="Polyline"):
    for filename in filenames:
        with arcpy.da.SearchCursor(filename, fields, where) as cursor:
            for row in cursor:
                print filename, "has null values"

I get - RuntimeError: cannot open 'filename'

Thanks for any help and time/consideration.