Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

¿ How I can update only one row ?

user10182692Jun 16 2009 — edited Jun 17 2009
Hello,

I have to update a table called status where the status to change is for example 300 and I want to change to 50, the next query is not working, the message that I receive is:

ORA-01732: data manipulation operation not legal on this view,

And this is the query:

update (SELECT a.* FROM (SELECT codcocina,status,fecmodif FROM vd.vdpedido ORDER BY FECMODIF DESC) a WHERE rownum = 1) set STATUS = 300

So Im telling to sql that the first row that contain the codcocina, status(whatever the value is) order by date (fecmodif) set the status = 300 to the first value (definied by rownum = 1).

Any help?????, Sorry for my english.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 15 2009
Added on Jun 16 2009
8 comments
2,673 views