Skip to main content

create a test field, type short. apply this code in field calculator: 1 - choose "python" as a parser: 2 - check show block: 3 - write these line in pre-logic text-box: def test(a,b): if a==b: return 1 else: return 04 - at the last text box write this line:test(!field1!,!field2!)5 - Field1 and field2 should be your two field to be compared: 6 - Then you can find the different values on test field, rows with number 1 are same and the rows with 0 are different:

  1. choose "python" as a parser:
  2. check show block:
  3. write these line in pre-logic text-box: def test(a,b): if a==b: return 1 else: return 0
  4. at the last text box write this line: test(!field1!,!field2!)
  5. Field1 and field2 should be your two field to be compared:
  6. Then you can find the different values on test field, rows with number 1 are same and the rows with 0 are different:

create a test field, type short. apply this code in field calculator: 1 - choose "python" as a parser: 2 - check show block: 3 - write these line in pre-logic text-box: def test(a,b): if a==b: return 1 else: return 04 - at the last text box write this line:test(!field1!,!field2!)5 - Field1 and field2 should be your two field to be compared: 6 - Then you can find the different values on test field, rows with number 1 are same and the rows with 0 are different:

create a test field, type short. apply this code in field calculator:

  1. choose "python" as a parser:
  2. check show block:
  3. write these line in pre-logic text-box: def test(a,b): if a==b: return 1 else: return 0
  4. at the last text box write this line: test(!field1!,!field2!)
  5. Field1 and field2 should be your two field to be compared:
  6. Then you can find the different values on test field, rows with number 1 are same and the rows with 0 are different:
Source Link
riflo
  • 1.2k
  • 8
  • 15

create a test field, type short. apply this code in field calculator: 1 - choose "python" as a parser: 2 - check show block: 3 - write these line in pre-logic text-box: def test(a,b): if a==b: return 1 else: return 04 - at the last text box write this line:test(!field1!,!field2!)5 - Field1 and field2 should be your two field to be compared: 6 - Then you can find the different values on test field, rows with number 1 are same and the rows with 0 are different: