I am trying to find the empty fields in a feature class and delete the fields.i am checking the number of empty or null rows are equal to total number of rows then i am deleting the field.i don't want to go throw all the rows and check field is empty or null.but many fields has spaces in the records i want to trim the spaces in string fields. i could not fingure it how to add trim function in SearchCursor where_clause or in sql_clause. could you please let me know how to do it.
did that code throw an error? python uses strip() to remove whitespace
a = " a "
a.strip()
'a'
What back-end DBMS/datastore holds your data? The support of TRIM and other SQL functions is DBMS/datastore specific. For example, trying to use TRIM in a WHERE clause with file geodatabases will generate a Python RuntimeError due to invalid expression.