我收到此错误:ORA-00907:缺少右括号
有了这个HQL:
select new map(r,count(pt)) from Role r
inner join r.portfolioTeams pt
inner join pt.teamStatusTransitions ptst
inner join ptst.teamStatus tst
where pt.id.bankId = :bankId
and pt.id.networkDistributorId = :networkDistributorId
and ptst.id.startDate <= :startDate
and (ptst.endDate is null or ptst.endDate > :endDate)
and tst.id.teamStatusId in (:statusId)
and (r.id.cpmRoleId in (:roles) OR r.id.cpmRoleId in (:roles1) )
我检查了一下,没有遗漏的括号,我很确定它来自我的count(pt)。
任何的想法 ?
谢谢
最佳答案
也许在执行查询时没有绑定所有变量(:bankId,:networkDistributorId,:startDate,:endDate,:statusId,:roles,:roles1)?