I'm having an issue removing all the rows that have a certain value in them and then removing the other rows that have the same value as an already removed rows column. Here is an example of what I have right now:
SELECT Race.intRaceID, Register.intRegID, Member.intMemberID
FROM Race
LEFT JOIN Register ON Race.intRaceID=Register.intRaceID
LEFT JOIN Member ON Register.intMemberID=Member.intMemberID
which gives me:
+------------+-----------+-------------+
| intRaceID  | intRegID  | intMemberID |
+------------+-----------+-------------+
|       100  | 10        | 1           |
|       100  | 40        | 2           |
|       200  | NULL      | NULL        |
|       300  | 30        | 2           |
|       400  | 20        | 4           |
|       500  | NULL      | NULL        |
+------------+-----------+-------------+
So, what I'm attempting to do is remove a particular intMemberID (keeping the NULLs) and all of the intRaceID's they're associated with. I added
WHERE Member.intMemberID <> 2 OR Member.intMemberID IS NULL
Giving the result:
+------------+-----------+-------------+
| intRaceID  | intRegID  | intMemberID |
+------------+-----------+-------------+
|       100  | 10        | 1           |
|       200  | NULL      | NULL        |
|       400  | 20        | 4           |
|       500  | NULL      | NULL        |
+------------+-----------+-------------+
but that will not remove all intRaceIDs associated with the intMemberID. Any help would be greatly appreciated
The table I'm trying to show is this:
+------------+-----------+-------------+
| intRaceID  | intRegID  | intMemberID |
+------------+-----------+-------------+
|       200  | NULL      | NULL        |
|       400  | 20        | 4           |
|       500  | NULL      | NULL        |
+------------+-----------+-------------+
 
    