-811 is caused when execution of a SELECT has resulted in a result table containing more than one row.
Solution - Look at the syntax of the statement to ensure that it contains the proper condition specifications. If it does, there may be a problem with the data that is causing more than one row or value to be returned.
Best way to avoid duplication is to make the select with Cursor.A cursor is used to retrieve multiple rows in succession from a SELECT statement
Cursor has to be declared in the Working Storage Section and opened before fetching.