Here's my problem
I have this table called list
:
||client||name||address||zone||block||day||document||
and list
gets an update for document
from another table, payments
, from columns named document
and client
too.
The thing is that when I run this query
UPDATE list SET document=(SELECT document FROM payments WHERE list.client=payments.client)
I get the error Subquery returns more than 1 row
when the document
value is repeated for different client
value on payments
table. Obviously I get the error because the value is repeated, but I need to fill the document
column with the corresponding client
even do there's the same document
for different client.
How is the query suppossed to be in this case? If it exist, of course.
Thanks.