Try to add and rownum=1 to your subquery conditions if you do not care about the value from the list or do sure that they are the same.
UPDATE FIPS_CODE
SET GROUP_CODE = (SELECT group_code FROM GROUPS WHERE GROUPS.FIPS = fipscd and rownum=1)
WHERE EXISTS (SELECT group_code FROM GROUPS WHERE GROUPS.FIPS = fipscd)
Main Topics
Browse All Topics





by: sjwalesPosted on 2007-06-28 at 08:14:45ID: 19381520
A good explanation of this error is here: http://www.techonthenet.co m/oracle/e rrors/ora0 1427.php
This line:
SET GROUP_CODE = (SELECT group_code FROM GROUPS WHERE GROUPS.FIPS = fipscd)
looks like it could be the culprit.
The "=" statement here is expecting the subquery to return a single row. The error message would seem to indicate that it's returning more than one row. Since you can't set the value GROUP_CODE to more than one value as is being returned by the subquery, you get the error.
Refine your subquery so that it returns only one row.