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

Item Value
SQLCODE -864
Constant SQLE_INVALID_NUMBER
SQLSTATE 42W71
Sybase error code 13869
ODBC 2 State 37000
ODBC 3 State 42000

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.