MBoy
asked on
SQL simple delete duplicate rows
I can't figure out what I'm doing wrong. I know I'm being toopid
DELETE
FROM MasterKeyData
WHERE ((OperatorCode IS NULL)
AND
(MasterKeyDataID NOT IN (SELECT MAX(MasterKeyDataID) FROM MasterKeyData GROUP BY IPAddress, EventCode, EventType)))
DELETE
FROM MasterKeyData
WHERE ((OperatorCode IS NULL)
AND
(MasterKeyDataID NOT IN (SELECT MAX(MasterKeyDataID) FROM MasterKeyData GROUP BY IPAddress, EventCode, EventType)))
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
forgot END and GO