TableA (id int, batch char(15), mode char(10), match2 char(15), status char(15))
ID Match MODE match2 STATUS
1 ABC12 A 123
2 ABC12 A 123
3 ABC12 A 123
4 ABC12 B 234
5 ABC12 B 234
6 BCD32 A 456
7 BCD32 B 456
So, I need to populate Status with ‘PASS’ where mode = ‘B’ and
- For same match, if its corresponding mode A (ID1,2,3) if we talk about ABC12, It has different Match2.
So ID 4 and 5 will get “PASS”.
Thanks in advance.
Try the following: