There is a table ‘Utility_Fee_Address‘ that address points are joined with buildings so in many cases there are several addresses on one building. Each address has special Land use code assigned by an engineer and it could be same or different in one building. What I want to do is to locate that the land use code of address point are different in one building so it populates in ‘D(differency)’ column like 1 is same and 2 is different.
If there are 4 addresses has same landuse code in one building then call it 1 in D column and if there are 4 addresses has one different landuse code in one builing then call it 2.
First you need to look at B (building id) and then among the same building unique id, you need to look at the land use code and see if there is any differency of its value, I called this loop within a loop.
So the final attribute table looks like below(A:Address,L: landuse, B: bldg id, D: Different Yes No)
A L B D
1 1 1 1
2 1 1 1
3 2 2 2
4 1 2 2
5 5 3 1
6 5 3 1
7 5 3 1
8 8 4 2
9 7 4 2
Please help me out. There are a couple of thousand records to look at it. This script makes my job much easier.
Bookmarks