Thanks Darren,
I tried: the same error: Invalid expression.
I definitely got working with ModelBuilder first, then exported to Python.
So,
In GUI (ModelBuilder) (with SQL Query Builder wizard):
Yr IS NOT NULL (it works in ModelBuilder without any quotes)
in Python (*.py):
I tried:
1) where_clause ='Yr IS NULL' - ERROR
2) where_clause ='"Yr" IS NULL' - ERROR
3) where_clause =""""Yr" IS NULL""" - ERROR
arcpy.Select_analysis(InFC, OutFC, where_clause)
For another field (text) it works fine in Python
arcpy.Select_analysis(InFC, OutFC, "Prime = 'Iron Ore'")
I've noticed that I work with layer(not feature class). I do MakeFeatureLayer that is the input for Select. Could it have an impact?