a subquery returned not exactly one row [message #23106] |
Mon, 18 November 2002 13:44 |
Jay
Messages: 127 Registered: October 1999
|
Senior Member |
|
|
Hi
I am trying to update a table in UNIX using Informix-SQL. I get an error message that state a subquery returned not exactly one row. I tried using a declare/open/fetch query, but I don't think that Informix-SQL allows this. My code is simple and is as follows:
update act
set co_no = (select county_no from spk_city
where spk_city.zip = act.zip)
where act.zip in
(select zip from spk_city)
I think the problem is becuase there are duplicate zip codes in the act table. Am I correct?
|
|
|
|
|
Re: a subquery returned not exactly one row [message #23130 is a reply to message #23127] |
Tue, 19 November 2002 10:17 |
Jon
Messages: 483 Registered: May 2001
|
Senior Member |
|
|
I believe this would only work if both zip and county_no are duplicates; if the zip is duplicate but the county_no is not, you will have the same problem. I haven't tested that, but I believe that to be the case.
|
|
|