tandebao888
tandebao
采纳率28.6%
2016-07-27 06:53 浏览 1.2k

hibernate hql查询报错

报错信息:Caused by: net.sf.hibernate.QueryException: in expected: select [select a.NPC_SRPC_inventory from (select (tn.skuNum+tng.arrivedQty+tng.onHandQty) as NPC_SRPC_inventory,tng.partCode as partcode,tn.organizationCode as orgCode from cn.com.sony.newsis.reception.form.NpcStockInfoForm as tn,cn.com.sony.newsis.reception.form.NpcGproInventoryForm as tng where tng.partCode=tn.skuCode and tn.stockStatus='A') as a,cn.com.sony.newsis.maintenance.form.PartInfoForm2 as b where a.partCode='X21035056' and a.orgCode=3013 and b.partCode='X21035056']
at net.sf.hibernate.hql.FromParser.token(FromParser.java:102)
at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:123)
at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:293)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1530)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1501)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
at cn.com.sony.newsis.util.hibernate.AllDefaultDaoImp.list(AllDefaultDaoImp.java:559)
... 65 more
hql语句:select a.NPC_SRPC_inventory from (select (tn.skuNum+tng.arrivedQty+tng.onHandQty) as NPC_SRPC_inventory,tng.partCode as partcode,tn.organizationCode as orgCode from NpcStockInfoForm as tn,NpcGproInventoryForm as tng where tng.partCode=tn.skuCode and tn.stockStatus='A') as a,PartInfoForm2 as b where a.partCode='A1609591A' and a.orgCode=3013 and b.partCode='A1609591A'

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答 默认 最新

相关推荐