Skip to content
Advertisement

DB Query not running as wanted

My goal is to choose the highest record(By SALE) from table partition by company(CNAME) and delete other records.

Table Values:

My Code:

Now this issue is I’m getting

ORA-00928: missing SELECT keyword

this error if I don’t use this select * from Tn;

Even if I use I see no changes in the table.

I’m Oracle SQL Live platform to use my query. Please suggest the issue of my query.

Please suggest any other way without using Common Table Expression.

UPDATE

I have tried out this also:

But it is saying

ORA-00907: missing right parenthesis

Advertisement

Answer

If you want to delete from original table then CTE will not help you.

You will need something like following:

Cheers!!

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement