0

I'm trying to perform an SQL query in ArcMap with the following data set, and I have not been able to solve the problem.

 Ar

The idea is to keep all the information of the columns, but for example if the column "sens" has the value "S1" discard the value "S2_adjusted" that has a value of "NaN" but leave the column "S1_Adjusted". The same process for the data with value "S2" in the "sens" column, that is, leave only the value of "S2_adjusted" and discard "S1_adjusted". Without losing information in other columns.

I am using Arcmap 10.6.1 and the data comes from an Excel file.

Do you think that an SQL query is the correct approach?

  • Please Edit the question to specify the exact release of ArcMap in use and the type data source of this table (and if Enterprise geodatabase, which RDBMS and what release). Normalizing a "adjusted_sensor" field would seem to be indicated, but that would require a CASE construct. – Vince Jun 20 at 20:15
3

The way I would handle this problem would be to generate a new empty field and populate it using the field calculator. This way you will not lose any data and can keep your original data without any modifications to the fields.

"New Field" =

reclass(!sens!, !S2_adjusted!, !S1_adjusted!)

Pre-Logic Script Code:

def reclass(a, b, c):
    if (a) == 'S1':
        return (c)

    elif (a) == 'S2':
        return (b)

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.