Quote:
Originally Posted by anasoul
This was the first I tried, returns error, that single row query returns moltiple rows.
|
So, as the error says, the problem is not in the syntax, but in data - either insufficient join conditions or wrong data model/consistency. Unfortunately, Oracle cannot update one column in one row with multiple values - which one should be taken anyway?
This query should return (ID2, NSTHET) values from RASHODZ which would be updated with multiple values (not tested because no test case included):
Code:
select s.id2, n.nsthet, count(*)
from
shipment_plan s,
naklrashodz n,
trans_task_load t
where n.nsthet = t.nsthet
and s.idts = t.idts
group by s.id2, n.nsthet
having count(*) > 1;