Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I would like to populate a feature class float attribute with a numerical ranking of a text attribute of a geologic map. I have a field named [sheet_unit] with strings such as "H10, Q" and "J10, Pl" with I would like to relabel in another attribute [Stratigraphic_Rank] with a numerical value such as 0 and 10, etc. I was hoping to use an IF THEN statement but I cannot for the life of figure out how to use the field calculator to do this. Anyone willing to help me start?

This and my several variations of it don't work:

If [sheet_unit] = "H10, Q" THEN [Stratigraphic_Rank] = 0 ElseIf [sheet_unit] = "J10, Pl" [Stratigraphic_Rank] = 10 EndIf

share|improve this question
add comment

1 Answer 1

Create a lookup table of ([sheet_unit], [Stratigraphic_rank]) pairs. Join this to your original table. Done! If you want to make it permanent, use a field calculation to copy the joined value of [Stratigraphic_rank] into a new field, then remove the join.

share|improve this answer
    
This worked perfectly. Thanks! –  Gabriele Casale Feb 20 '11 at 2:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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