It's not a secret anymore!*
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
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply locked New topic
Author

error in query

raj chopra
Ranch Hand

Joined: Apr 09, 2012
Posts: 60
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 , com.syntel.sb.appl.bo.client.SBMember m,com.syntel.sb.appl.bo.vendor.SBBid b ,com.syntel.sb.appl.bo.client.SBClient 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.


Reagrds,
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.


Thanks,
Tushar (SCJP 1.5)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error in query