Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Sadhu
Starting Member
14 Posts |
Posted - 2014-09-11 : 01:12:37
|
Hi..Please find the sample data below :WID | ApproverID | HID | ResponsibleID33507 722 2 99033507 2696 1 99033507 990 1 99033508 2784 2 125233508 1252 1 1252 33508 2652 1 1252Now, for each WID, I want to delete the rows having same value for HID and having ResponsibleID = HIDFor example, from the above data, the rows highlighted in RED should be deleted.Thanks in Advance! |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-09-11 : 09:29:13
|
delete from mytablewhere ResponsibleID = HID |
|
|
|
|
|