As per Sybase documentation , this is the supported way to create temp tables based on the results of a select:
select type, "Total_amount" = sum(advance)
group by type
But Hibernate  is generating:
insert into #Vehicle select vehicle0_.id as id from ( select id, vin, owner, 3 as clazz_ from SUV union select id, vin, owner, 4 as clazz_ from Pickup union select id, vin, owner, 1 as clazz_ from Car union select id, vin, owner, 2 as clazz_ from Truck ) vehicle0_
Branch_3_2_4_SP1_CP with Sybase 15
These tests are all succeeding now that tempdb is properly configured to allow DDL in transactions.
Juca, can this be resolved?
I confirmed that all listed test cases are now passing for Sybase. So, I'm closing this issue.
Changed resolution to "Rejected" because this was due to a DB config issue, not a Hibernate bug.
Bulk closing stale resolved issues