Empty varchar is not null
Posted on 2009-05-19
I've been inserting a textarea field from a form into a varchar field. This textarea field is empty most of the time, but the field in the database is not null. When I run a len() on the fields that look blank I get numeric values ranging from 2 to 10, so there is some kind of data in there even though I can't see anything and the textarea was blank.
Going forward I am using validation on the front end to insert them specifically as null, but I'd like to be able to go clean up the table and make them all null because I'm now trying run a case statement off that field.