PL/I · DB2 SQLCODE
What does SQLCODE -811: Subquery or Subselect Returned More Than One Row or Value mean in PL/I?
An embedded SELECT INTO, a SET-clause subselect, or a subquery in a basic predicate that the PL/I program expects to return exactly one row (or one value) instead returned multiple rows, because the WHERE clause isn't as selective as the program assumes.
An embedded SELECT INTO, a SET-clause subselect, or a subquery in a basic predicate that the PL/I program expects to return exactly one row (or one value) instead returned multiple rows, because the WHERE clause isn't as selective as the program assumes.
Tighten the WHERE clause so it can only match one row, or restructure the statement to use a cursor with a fetch loop if returning multiple rows is actually valid for this case.