-8008 The secondary field column_name can only be used in a search field.
Explanation
column_name is a secondary field. It can be used only as a search field in the WHERE clause of the SQL statement. It cannot be listed in SELECT column list nor ORDER BY clause in the SELECT statement. It cannot be used in the SET clause of the UPDATE statement, nor in the insert column list in the INSERT statement.
System action
The statement cannot be processed.
Programmer response
Correct the SQL statement. Ensure that the secondary field is specified only in the WHERE clause of the SQL statement.
SQLIMSSTATE
58030