I have a TableA
ID MatCh01 Match02 Status
1 1001 12
2 1001 12
3 1001 12
4 1002 44
5 1002 47
6 1003 22
7 1003 22
8 1004 55
9 1004 57
I want to populate column = status with “FAIL” when :
For same match01, there exist different match02. Expected TableA :
ID MatCh01 Match02 Status
1 1001 12 NULL
2 1001 12 NULL
3 1001 12 NULL
4 1002 44 FAIL
5 1002 47 FAIL
6 1003 22 NULL
7 1003 22 NULL
8 1004 55 FAIL
9 1004 57 FAIL
Please NOTE: FAIL all ‘match01’ if its corresponding ‘match02’ is different.
Thanks
Basically this says Update all Values in TableA when the MAX and MIN of Column Match02 are not equal (meaning match01 has multiple rows with different values for match 02).