Hi,
I'm trying to build a ReportNet framework, and I need to create a query subject based on a manually typed SQL statement.
The problem I have is that my SQL statement contains multiple MINUS clauses to remove many subsets of unrequired data from the main query. The query works when I execute it on the Oracle DB, but when I try and use the SQL in Framework Manager (I've changed the table / column names to reference the framework components and datasources) it is triggering an expression syntax error.
As the query executes successfully on the DB (oracle) I know the logic is correct. I've also tested the framwork components and datasources that my SQL is referencing and they are working fine, so I'm fairly certain the problem is with the MINUS clause in the SQL. The error I'm getting is:
The SQL query itself is structured like (I know its a very vague looking query, but but the actualy SQL is pretty scary and pages long):
Does anyone know if the MINUS clause is supported by Framework Manager, and if yes, please provide me with some suggestions of where I might be going wrong?
Cheers
J
I'm trying to build a ReportNet framework, and I need to create a query subject based on a manually typed SQL statement.
The problem I have is that my SQL statement contains multiple MINUS clauses to remove many subsets of unrequired data from the main query. The query works when I execute it on the Oracle DB, but when I try and use the SQL in Framework Manager (I've changed the table / column names to reference the framework components and datasources) it is triggering an expression syntax error.
As the query executes successfully on the DB (oracle) I know the logic is correct. I've also tested the framwork components and datasources that my SQL is referencing and they are working fine, so I'm fairly certain the problem is with the MINUS clause in the SQL. The error I'm getting is:
Code:
QE-DEF-0177 An error occurred while performing operation 'sqlPrepareWithOptions' status='-16'.
UDA-SQL-0358 Line 29: Syntax error near "MINUS".
The SQL query itself is structured like (I know its a very vague looking query, but but the actualy SQL is pretty scary and pages long):
Code:
select <columns>
from TABLE_1,
(select <columns> TABLE_2 where kind = 'LEVEL2') c2,
(select <columns> TABLE_2 where kind = 'LEVEL3') c3,
(select <columns> TABLE_2 where kind = 'LEVEL4') c4,
( select <columns> from TABLE_3 where <clause>
UNION all
select <columns> from TABLE_3 where <clause>
MINUS
select <columns> from TABLE_3 where <clause>
MINUS
select <columns> from TABLE_3 where <clause>
) aa
where <join conditions>
Does anyone know if the MINUS clause is supported by Framework Manager, and if yes, please provide me with some suggestions of where I might be going wrong?
Cheers
J