Query with union works in SQL*Plus but errors out in Oracle Reports
I'm developing a report that uses a union and it is crashing in Oracle Reports but works fine in SQL*Plus and TOAD. When the report crashes the log just says:
stat_low = 8B
stat_high = 0
emsg:was terminated by signal 11
Each part of the query, the top part above the union and the part below the union work fine in Oracle Reports when run by themselves, but when I union them together it crashes. If I copy that unioned SQL to SQL*Plus or TOAD it runs ok. If I comment out the subselects in each query then it runs with the union just fine. I've seen numerous reports created with unions and columns that are derived from subselects before. I can't see what's wrong. I assume it's somehting simple that I've overlooked but I still can't figure it out.