Link to home
Start Free TrialLog in
Avatar of MBoy
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)))
ASKER CERTIFIED SOLUTION
Avatar of Emes
Emes
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MBoy
MBoy

ASKER

I'm an idiot

forgot END and GO