I’m using SSRS (2k5) to report on data from oracle. The report’s purpose is to process about 100 checks (when complete) on data to see if it was entered correctly (and our software is acting the way it is supposed to). To accomplish this I created a package and pipelined function implimenting the WITH Clause. Roughly the package built in Oracle looks like this:
WITH A as (select stuff from X), B as (select stuff from Y join X), C as (select stuff from Z join X)
Subquery1
Union
Subquery2
Union
...
Subquery100
I call this package function directly from SSRS using Table(). Everything works fine for a while. However if I run it later in the day I get an error message:
ORA-32036: unsupported case for inlining of query name in WITH clauseORA-6512: at “[function name]”
However if I open Oracle SQLDeveloper, and run the function then come back to SSRS, everthing runs fine (for a while).
I realize it is probably getting angry at my nested WITH clauses, but what would cause it to work for a while, then fail soon after? Note it always works in SQLDeveloper.
Thanks in advance for your assistance!
Perhaps Jeff implied this earlier, however I did get this to work by containing the oracle query by using
OPENQUERY().Curiously though I still have to run the query once after all changes for it to work, but I no longer have to run it before I need to run the report. Thanks all again for your help!