"CommandText does not return a result set" when using "WITH" clause in Oracle



I have a correct SQL that works through
- BDE's TQuery,
- Delphi's 'SQL Explorer'
- Oracle 10g iSQL*Plus
but not when run in an application's TADOQuery.

I get an error:
"CommandText does not return a result set"

The SQL has a 'WITH' (it is the cause of the error), like this:

WITH
SEL1 as(
select *
from table1
group by field1),
SEL2 as(
select *
from table2
group by field2)

select a.field3, b.field4
from SEL2 a,
SEL1 b
where a.field1 = b.field1

Any ideas?

Thanks in advance for any help.
Nenad

.



Relevant Pages