Open lukaseder opened 4 years ago
As a bonus, this one crashes the JDBC connection:
select *
from (
select *
from (
select 'A' [x]
) x
union
select *
from (
select 'B' [x]
) x
union
select *
from (
select 'C' [x]
) x
) x
intersect
select *
from (
select 'A' [x]
) x
order by 1
In the past, we had skipped a few integration tests in Sybase ASE, which had many issues related to combining and nesting set operations. We can observe:
This works
Resulting in
This fails with an internal error
Raising
This works again:
Producing:
This fails, where
INTERSECT
behaves likeUNION ALL
:Producing
Workaround
Obviously, Sybase seems to be full of bugs in this area. But perhaps, we can work around some of them and produce queries that produce correct results.