I have a new column in my attribute table with a lot of null values and I want to replace all them to zeros.
How can I do that in field calculator?
I'm using QGIS 1.8
Answer
In QGIS open your attribute table and click the "Select Features Using an Expression" button. To find all the null records for a field in a shape file your query will look like:
"field_name" is null
You can find your field name in the Fields and Values list, double click the field you want to get it into the Expression box.
Make sure you SELECT the new filtered list of records. Then go back to the attribute table and click the Field Calculator button. Check the "Update Existing Field" box - ensuring that the 'only update selected' check box is selected, then select the field you want to update from the dropdown box. Put 0 in the expression box, click OK and you're done.
No comments:
Post a Comment