This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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!