Hi,
I want to delete duplicate record, by keeping only one row for such duplicate records in Multiset table.
Suppose we have 2 rows with values 1, 2, 3 and 1, 2, 3 in my multiset table then after delete i should have only one row i.e. 1, 2, 3.
select * from jedi_mvn_db.zam_multiset
where (col1,col2,col3) in
(select col1,col2,col3 from jedi_mvn_db.zam_multiset group by 1,2,3 having count(*)>1)
qualify row_number() over (partition by col1,col2,col3 order by col1,col2,col3)>1;
above select gives me correct result. But when i convert this select statement into delete statement as below, it gives error "expected something between ")" and qualify keyword.
delete from jedi_mvn_db.zam_multiset
where (col1,col2,col3) in
(select col1,col2,col3 from jedi_mvn_db.zam_multiset group by 1,2,3 having count(*)>1)
qualify row_number() over (partition by col1,col2,col3 order by col1,col2,col3)>1;
I came to know that qualify cannot be used in delete statement.
Is there any way to delete such duplicate records with out using ROWID ?
Forums: