adodb中的oracle with clause错误

时间:2014-11-09 17:48:52

标签: oracle adodb

我无法在oracle adodb连接中使用with子句。我试过包装qry是一个select * from(myquery)并在我的with子句之前添加一个。所有都会产生错误。

这是查询

`WITH TEMPa AS (select _nbr, sum(ending) as Cost from t1 group by _nbr),
TEMPB AS (select _nbr, cost,entity
from t2
where end_tms is null and sale_date is null and entity = 110)
SELECT

TEMPA._nbr
,TEMPA.cost
,TEMPb._nbr
,TEMPB._cost
,tempb.entity
,(tempb._cost - tempa.cost) as Difference

FROM TEMPA, TEMPB
WHERE TEMPA._nbr = TEMPB._nbr(+)
and  tempa.cost <> tempb.cost`

任何帮助都会很棒!

0 个答案:

没有答案