oracle 11G与10G 个别SQL差别
SELECT (select placename from sysloginplace where id = a.YardName) YardNameDisp,
a.YardName,
a.CntrOrUnit2,
count(*) CntrNum,
sum(a.labhourpg) LabHourPg,
sum(a.labhourfp) LabHourFp,
sum(a.cntrlabhourpf) LabHourPf,
sum(a.labhour) LabHour,
sum(a.matcostrmb) MatCostRMB,
sum(a.cntrmatcostpfrmb) MatCostPfRMB
FROM V_PM04_PGTJ a
WHERE (a.CntrRepState in ('02', '03'))
and a.CntrRepState = '02'
and a.IsRentBack = '0'
and a.CntrOrUnit2 = '3'
group by a.YardName, a.CntrOrUnit2
order by a.YardName, a.CntrOrUnit2
上面这个语句在10g可以正常执行,但在11g数据库中执行显示报错信息:ora-01427 单行子查询返回多个行
各位如何解决???