I am using the SQL Editor in IBM Data Server Manager to execute queries against DB2. The query in question works fine. However, when I click "Explain" to generate the access plan I get
"Access Plan Graph Cannot Be Generated"
and the diagnostic text is
The SQL statement failed. Explanation: The SQL statement resulted in an error with SQLCODE: -204 and SQLSTATE: 42704. User response: The DB2 documentation contains more information about the SQLCODE and how to resolve the error. "DB2ADMIN.TABLENAME" is an undefined name.. SQLCODE=-204, SQLSTATE=42704, DRIVER=3.66.46
The query is something like
select col1, col2 from tablename where pred=value
Why is it failing? What needs to be changed?