-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Getting an error with bulk insert on select.
PostPosted: Tue May 25, 2010 6:29 am 
Beginner
Beginner

Joined: Fri Sep 28, 2007 4:58 am
Posts: 21
Location: Chennai, India
Hi,

While insert on select i am getting below error.

Exception in thread "main" org.hibernate.QueryException: could not resolve property: of: xxx
at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:44)
at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:38)
at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassPropertyTableNumber(AbstractEntityPersister.java:1375)
at org.hibernate.hql.ast.tree.IntoClause.isSuperclassProperty(IntoClause.java:184)
at org.hibernate.hql.ast.tree.IntoClause.visitPropertySpecNodes(IntoClause.java:143)
at org.hibernate.hql.ast.tree.IntoClause.visitPropertySpecNodes(IntoClause.java:162)
at org.hibernate.hql.ast.tree.IntoClause.initializeColumns(IntoClause.java:125)
at org.hibernate.hql.ast.tree.IntoClause.initialize(IntoClause.java:37)
at org.hibernate.hql.ast.HqlSqlWalker.createIntoClause(HqlSqlWalker.java:945)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.intoClause(HqlSqlBaseWalker.java:839)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.insertStatement(HqlSqlBaseWalker.java:479)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:253)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)

The query is shown below.

insert into xxx(dte, Id,f1,f2,f3,f4,f5,f10,f11,cnt) select dte, Id,f1,f2,f3,f4,f5,f10, round(sum(f11*cnt)/sum(cnt),2), sum(cnt) FROM yyy WHERE dte >= ? and dte <= ? and Id = ? group by dte,f1,f2,f3,f4,f5,f10

Please let me know is there any issue in the query. The select statement will return multiple records.

Thanks in Advance.

Regards,
Purushotham Podaralla.

_________________
Purushotham Podaralla


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.