I could not find any reference in documentation to support it, but it seems that column aliasing in sub-selects isn't supported. I could not find any information in the docs which confirms or denies this, but running the test CriteriaQueryTest#testDetachedCriteriaAsSubQuery can confirm this.
Hibernate generates a query which ends in:
where ? in (select this_.courseCode as y0_ from Course this_ where this_.description like ?)
This fails in Sybase, with this message:
15:29:38,063 WARN JDBCExceptionReporter:77 - SQL Error: 156, SQLState: ZZZZZ
15:29:38,074 ERROR JDBCExceptionReporter:78 - Incorrect syntax near the keyword 'AS'.
Removing all "as" keywords returns the same message, even though the query itself doesn't have it. 
Removing the "as $alias" solves the problem.
The working line is:
where courseCode in (select this_.courseCode from Course this_ where this_.description like 'test%')
Branch_3_2_4_SP1_CP with Sybase 15
Forgot to add the  reference:
This page shows the options for "column renaming" (column aliasing), but it seems that none of them works in sub-selects.
Tests under DynamicFilterTest are also affected (in addition to the ones in CriteriaQueryTest).
I'm resolving this as a duplicate of because that issue provides more details.
Bulk closing stale resolved issues