I created a table that has the data similar to below. I need to count the field “group” and replace/update the group to that value of the one that has the highest count.
Table
Num Desc Group
1 xxxx A
1 yyyy A
1 zzzz B
1 xxxx A
1 yyyy B
2 abcd D
2 bcde D
2 zzzz A
etc…..
In the first group I would like to set all Num = 1 to A, Num = 2 to D.
The source data has about 50 different groups, so each time I build the table the number of groups (A,B,D) can vary and change. Bottom line is I want all values of group in a number subset to be the same and equal to the highest count of the subset. If they are equal I do not care which one it picks.
Help?
Table
Num Desc Group
1 xxxx A
1 yyyy A
1 zzzz B
1 xxxx A
1 yyyy B
2 abcd D
2 bcde D
2 zzzz A
etc…..
In the first group I would like to set all Num = 1 to A, Num = 2 to D.
The source data has about 50 different groups, so each time I build the table the number of groups (A,B,D) can vary and change. Bottom line is I want all values of group in a number subset to be the same and equal to the highest count of the subset. If they are equal I do not care which one it picks.
Help?