-051 identifier-name (sql-type) WAS PREVIOUSLY DECLARED OR REFERENCED
Explanation
The identifier name has already been defined for the indicated type of SQL object.
- identifier-name
- The name that has already been used.
- sql-type
- The type of SQL object: TABLE, CURSOR, or STATEMENT.
The definition might have occurred implicitly. For example, identifier-name might have been found in the FROM clause of a SELECT, which causes it to be defined as a table.
A cursor name must be unique within the program or routine.
System action
The statement cannot be processed.
User response
Remove duplicate definitions or correct the references.
SQLSTATE
3C000