Created
November 26, 2014 17:18
-
-
Save JosiahSiegel/23c5fc44547c6c1fc537 to your computer and use it in GitHub Desktop.
#Netezza Deduplicate all data in table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delete from TEST_DATA c where exists | |
(select rowid from TEST_DATA a | |
left outer join( | |
select min (rowid) as min_row, MSG_ID, MSG_ID2 | |
FROM TEST_DATA | |
GROUP BY MSG_ID, MSG_ID2 | |
) x on a.rowid = x.min_row | |
where x.min_row is null and a.rowid = c.rowid); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment