View references '%1', which is a temporary object. Views can only refer to permanent objects.

Item Value
SQLCODE -766
Constant SQLE_VIEW_OVER_TEMP_OBJECT
SQLSTATE 42U00
Sybase error code 4412
ODBC 2 State 42000
ODBC 3 State 42000
Parameter 1 Temporary object name

Probable cause 

Views must refer only to permanent objects, not to temporary objects such as local temporary tables.