This query does not work ERROR: 01427. 00000 - "single-row subquery returns more than one row":
I want to update the column values using the ROW_NUMBER () that is not a physical column.



This SELECT works perfectly. I want to copy the ROW_NUMBER () values for sequence_day_job column, in the same order
SELECT column_person_id, column_day_job, sequence_day_job, ROW_NUMBER() OVER (PARTITION BY column_person_id ORDER BY column_day_job) FROM table_name;
UPDATE 10/09/2015 (01) - UPDATE tried to accomplish something like this, but it did not work, if a temporary table would solve my problem? It's something that seems to be relatively simple for the use of a temporary table, and cmo will be a recurring believe that use of temporary table is not so interesting.
UPDATE PC_COMENTARIO SET COD_SEQUENCIA = ( SELECT ROW_NUMBER() OVER (PARTITION BY cod_processo ORDER BY dtc_andamento) FROM PC_COMENTARIO )WHERE cod_processo = 808;
//ERROR: 01427. 00000 - "single-row subquery returns more than one row"