Jason
Jason

Reputation: 794

Missing right parenthesis ORA-00907

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

Answers (1)

ruakh
ruakh

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

Related Questions