That works perfectly, thanks.

The confusion was the exact syntax for the sub-SELECT in your first
UPDATE... yours worked with

SQL> UPDATE address
  2  SET ward = (
  3    SELECT ward
  4    FROM contacts, add_contacts
  5    WHERE add_contacts.add_id = address.add_id
  6      AND add_contacts.con_id = contacts.con_id)

whereas I had SELECTed from all three tables:

  3    SELECT ward
  4    FROM address, contacts, add_contacts

..


ORA-01427: single-row subquery returns more than one row

and for some reason it didn't work. Why does selecting an extra table
in the sub-query cause it to give the error below (ORA-01427)?  Surely
the results table given by the sub-clause is the same in either case?

Thanks anyway!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to