RPG (IBM i / AS/400) · DB2 SQLCODE
What does SQLCODE -811 - More Than One Row Returned mean in RPG (IBM i / AS/400)?
A SELECT INTO, or a subquery used where only a single value is expected (such as inside a scalar comparison), returned more than one row from the underlying query.
A SELECT INTO, or a subquery used where only a single value is expected (such as inside a scalar comparison), returned more than one row from the underlying query.
Add a WHERE clause or key condition that guarantees uniqueness for a SELECT INTO, or switch to a cursor and FETCH loop instead if the query can legitimately return multiple rows.