Reputation: 794
I am getting an ORA-00907
error when I try to parse this statement. Any ideas on what I am doing wrong?
Thanks in advance!
DELETE
FROM teams
WHERE is_old=0
AND tm_counter NOT IN (SELECT MIN(dup.tm_counter)
FROM teams AS dup
GROUP BY dup.name, dup.squad, dup.region);
Upvotes: 1
Views: 298
Reputation: 183240
In Oracle, you can't use AS
before a table alias, only before a column alias. So, change this part:
FROM teams AS dup
to this:
FROM teams dup
Upvotes: 4