Statement contains an illegal usage of the NUMBER(*) function

Error constant SQLE_INVALID_NUMBER
ODBC 2 State 37000
ODBC 3 State 42000
Severity 15
SQLCODE –864
SQLSTATE 42W71
Sybase error code 13869
Probable cause

The NUMBER and IDENTITY functions can only appear in the select list of the outer-most SELECT block. It cannot be used in any subquery or in a predicate.