Here's my problem:
The SET sparepart.aenm = (SELECT mroitem.aenm
FROM sparepart, mroitem
WHERE sparepart.item_oi = mroitem.itemoi(+))
section is returning too many rows. The sparepart table has a link to the mroitem table, and in reality what I'd like to do is set the sparepart.aenm = the mroitem.aenm where the link holds true, but do it for each item pulled back from the where criteria on the UPDATE clause. I can't believe this should be difficult, but can't remember how to do it.
edit: to clarify, I think I need to have more WHERE criteria in the subquery, but don't know how to pass in the currently processing sparepart record.
:beer: for the solution
The SET sparepart.aenm = (SELECT mroitem.aenm
FROM sparepart, mroitem
WHERE sparepart.item_oi = mroitem.itemoi(+))
section is returning too many rows. The sparepart table has a link to the mroitem table, and in reality what I'd like to do is set the sparepart.aenm = the mroitem.aenm where the link holds true, but do it for each item pulled back from the where criteria on the UPDATE clause. I can't believe this should be difficult, but can't remember how to do it.
edit: to clarify, I think I need to have more WHERE criteria in the subquery, but don't know how to pass in the currently processing sparepart record.
:beer: for the solution