MySQL Forums
Forum List  »  Stored Procedures

Re: New to sp, ERROR 1172 (42000): Result consisted of more than one row
Posted by: Per-Erik Martin
Date: December 01, 2005 09:28AM

The problem is probably this line:

SELECT pet.owner<>event.owner,event.name,pet.species INTO comp,name_id2,species_id2 FROM event,pet WHERE pet.name=event.name;

When using INTO variables, it must return exactly one row, but apparently it does not. Either make the WHERE select a unique row,
or use LIMIT 1 to enforce a single result (which assumes that you want the first one).

pem, Senior Software Dev., MySQL AB

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: New to sp, ERROR 1172 (42000): Result consisted of more than one row
21752
December 01, 2005 09:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.