File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes error in query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply locked New topic

error in query

raj chopra
Ranch Hand

Joined: Apr 09, 2012
Posts: 64
Hi All,

My project deals with hibernate,springs,struts.
The below i present you the error i am getting in the web-appliation while executing a new query i coded for some changes in application.The query works fine when executed in database(oracle) according to the table namespaces etc. I believe it had something to to with hql format for the query i had written.

expecting OPEN, found 'FROM' near line 1, column 23 [SELECT ORGNAME,COUNT FROM (SELECT (count(o.organizationId)*100//(select count(bidId) from bid where clientId =166and deletionMark <>1 and bidStatus.code = 50 )) as COUNT , o.organizationId as org ,o.organizationName as ORGNAMEFROM SBOrganization o , m, b , c WHERE o.deletionMark =0 and m.deletionMark = 0 and b.bidStatus.code=50 and b.memberId =m.memberId and b.clientId =166 and c.clientId=b.clientId and c.deletionMark<>1 and m.organizationId =o.organizationId GROUP by o.organizationId ,o.organizationName ORDER by 1 DESC ) WHERE rownum <=10

Kindly help me to shoot the issue.

raj chopra
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 108

I think this is the same query as error at query. Did you notice that after putting your code within code tags its easy to troubleshoot ? Please do not post duplicate threads.

Tushar (SCJP 1.5)
I agree. Here's the link:
subject: error in query
It's not a secret anymore!