Cursor WHERE clause selecting NULL values doesn't frickin' work

Discussion created by cheesiegoodness on May 25, 2012
Latest reply on May 25, 2012 by curtvprice
Hi Forum,

I've written a script that rotates rectangular index polygons based on a value in a rotation field in a FC. I walk through the original polygon FC with a search cursor, rotate each point of the polygon around its centroid and then create a new polygon object. I then APPEND this polygon to a new FC created in the beginning of the script. This all works fine and dandy.

The problem is that I want to carry over the attributes of the original polygon to the new one. I'm attempting this by opening an update cursor after the APPEND on the new polygon FC with a WHERE clause such as "ID IS NULL" and populating the new blank polygon with the previously stored attribute values. However this returns no rows. IS THIS A BUG? I've looked at the output polygon FC and it indeed has true <NULL>s in the fields (such as ID). I've tried other variants of the clause which invariably returns an "Invalid SQL Statement" every time - as it should.

I really don't want to open a cursor on the entire new FC each time and use row.isNULL(field_name) while walking through the entire thing, but if I have to I will. Is there a way to fill the polygon array or object with the fields and their values before APPENDing it to the new FC? I've looked in the docs, forums and interwebs and haven't found any examples of this method. Is it possible? Or ...

Am I doing something wrong here?

ArcGIS 10 SP4 on Windows 7 Pro

TIA, Wilbert