3

Can someone please help explain if the empty '' means something?

I am wondering if it might be inserted by typo or if you use these empty quotes to locate empty fields within the attributes.

empty quotes - question

3

Yes, it'll select all rows where the COMMENTS field is empty. I just tested and it also selected rows with a single space: ' ' (tested with an .mdb feature class).

However, it will not select Null values (use IS NULL for that).

  • That is not precised. It will not select empty fields. Note that a single space within a field doesn't make it empty. It also valid for text type fields, and not for integers, float, etc. The IS NULL is the way to select "real" empty fields. – dof1985 Apr 8 '15 at 22:15
  • 3
    @mvg04 And thus a good example of how null is not zero or empty, null is null. Note that shapefiles, which use the dbf format, don't support null values, thus anything null they store is a space or 0. This will happen frequently when moving data back and forth between a geodatabase and a shapefile, particularly in mixed editing environments. – Chris W Apr 8 '15 at 22:16
  • thanks for the note on shapefiles, I don't use them too often so I wasn't aware of that. It seems fair to assume then that the OP has the preferred way to look for empty attribute (string) values in a shapefile. – mr.adam Apr 8 '15 at 22:29
  • 1
    @dof1985 You can't just blank the (null) value, because yes, that will revert to a null. However if you enter any other value (for either data type), and then delete that (may need to save edits between), it will leave a blank/empty field. I have an open attribute table in front of me that exhibits this. It's a real nuisance when you bring shapefile data into a geodatabase and then edit/create more records, because then you end up with a mix of true null and empty records for a given field. – Chris W Apr 8 '15 at 22:57
  • 1
    yes, this is a really good point, because to turn a value into a real Null value you have to use field calculator. I understand exactly what @dof1985 was getting at. – mr.adam Apr 8 '15 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.