1

I am editing a vector layer in ArcMap 10.1 in the attribute table the no data value for some of my fields is -1.7976931348623157e+308. I would like to replace that with 0.

I attempted to use the Find and Replace function in the Table Options using the following settings:

Find what: -1.7976931348623157e+308
Text Match: Whole field
Search: Down
Match Case: Unticked
Search Only Selected Field(s): Ticked
Replace with: 0

Clicking either Find Next or Replace All results in an error message:

Search error
An invalid SQL statement was used.
An invalid SQL statement was used. [Ground_Dissolve2]
An invalid SQL statement was used. [SELECT * FROM Ground_Dissolve2 WHERE (htMN = -1.79769313486232e+308)

What does this error message mean and how do I replace -1.7976931348623157e+308 with 0?

3

Try the following:

  • You can use a simple python function in Field Calculator to do this update. I'm not sure if you have any other values that may be less than zero, if so you can just change if value < 0: statement. See example below:

enter image description here

  • An alternative would be to do a select by attribute on all records that are < 0, then simply field calculate 0 for those selected records.
  • I get a syntax error on line 4 def changeVal(value): if value < 0: return 0 else: return value and changeVal( !htMN! ) where htMN is the field to be changed – falcs Sep 10 '13 at 9:14
  • It was something to do with the number of spaces before the text on each line – falcs Sep 10 '13 at 9:55
0

Have you tried this ? Would this help ? There is a toolbox that might help you ? Check this out From/to String toolbox

If this is not what you looking for then there are others on that website.

  • It looks like artwork copied this from that Geospatial Analyst website. Sorry for duplicate. – PROBERT Sep 10 '13 at 14:20

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.