Informatica中跑工作流SQL报错

0
Informatica中源是用如下SQL写的,跑工作流时报错如下:missing right parenthesis,请问下有没有人遇到过此问题?
以下SQL在PL/SQL里面查询是没有问题的。还有其他类似的SQL也出现此问题,请大家回答下,谢谢。

select e.code as code,
e.name as name,
x1.tchj1 as tchj, / 台次合计 /
y1.gsfyhj1 as gsfyhj, / 工时费用合计 /
z1.bjfyhj1 as bjfyhj, / 备件费用合计 /
xy4.bjwxck1 - nvl(xy5.llthrk1, 0) as bjwxck / 备件维修出库 /
from tbdpb_ce e
left join (select x.vceid, wxtc as tchj1
from rpt_tchj x
where x.tjsj = '201311') x1
on e.vceid = x1.vceid
left join (select y.code, y.wxsj, sum(y.hjgs) as gsfyhj1
from rpt_wxgs y
where y.wxsj = '201311'
group by y.code, y.wxsj) y1
on e.code = y1.code
left join (select z.code, z.wxsj, sum(z.hjbj) as bjfyhj1
from rpt_wxbj z
where z.wxsj = '201311'
group by z.code, z.wxsj) z1
on e.code = z1.code
left join (select ab5.vceid,
sum(ab6.costprice * ab6.qty) as bjwxck1,
to_char(ab5.deliverydate, 'yyyymm')
from tfmp_pdelivery ab5
inner join tfmp_pdeliveryitem ab6
on ab5.pdeliveryid = ab6.pdeliveryid
where to_char(ab5.deliverydate, 'yyyymm') = '201311'
and ab5.pinvtranstype = '维修出库'
group by ab5.vceid, to_char(ab5.deliverydate, 'yyyymm')) xy4
on xy4.vceid = e.vceid

--------------------------------------领料退货入库

left join (select ab7.vceid,
sum(ab8.costprice * ab8.qty) as llthrk1,
to_char(ab7.receivingdate, 'yyyymm')

from tfmp_precv ab7

inner join tfmp_precvitem ab8
on ab7.preceivingid = ab8.preceivingid

where to_char(ab7.receivingdate, 'yyyymm') = '201311'
and ab7.pinvtranstype = '领料退货入库'

group by ab7.vceid, to_char(ab7.receivingdate, 'yyyymm')) xy5
on xy5.vceid = e.vceid

---------------------------------------领料退货入库
已邀请:
2

lanmengxiaozi - 80后IT 2013-12-30 回答

这个是由于你在SQ里面写的SQL太长了。。。SQ里面写的sql字符长度是有限制的。。建议你在数据库新建视图或者通过join组件一个表一个表的join。
2

Evershy - INFA 2014-10-10 回答

语句第一段里有问题

select e.code as code,
e.name as name,
x1.tchj1 as tchj, /* 台次合计 /
y1.gsfyhj1 as gsfyhj, / 工时费用合计 /
z1.bjfyhj1 as bjfyhj, / 备件费用合计 /
xy4.bjwxck1 - nvl(xy5.llthrk1, 0) as bjwxck / 备件维修出库 */
from tbdpb_ce e

注释 / ……/前面有个逗号 后面就直接接上from

要回复问题请先登录注册