techytechy
MIS
Hi Guys,
Need query help with this scenario.
T
------------------------------------
ID Code Name status
--------------------------------------
1 1 Name1 Good
2 2 Name2 Bad
3 1 Name1 Bad
...
...
-----------------------------------
when a record with the status = Good exists and if there are more records with the same Name and Code then those records should be deleted including the one with status = good.
In the above ID = 1, ID = 3 need to be deleted as they have same Code and Name and status of one of them is 'Good'.
Thanks
Need query help with this scenario.
T
------------------------------------
ID Code Name status
--------------------------------------
1 1 Name1 Good
2 2 Name2 Bad
3 1 Name1 Bad
...
...
-----------------------------------
when a record with the status = Good exists and if there are more records with the same Name and Code then those records should be deleted including the one with status = good.
In the above ID = 1, ID = 3 need to be deleted as they have same Code and Name and status of one of them is 'Good'.
Thanks