Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query with 'AND' not running in servlet...

 
Kutub Shaikh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

we are trying to run following query in servlet, it sends error " cannot resolve symbol 'AND', but it is working fine in oracle.

select TopicName,Qdetail,Uname,q.Memid,Reply from Questions q,Members m,Topics t where datetime in(select max(datetime) from Questions group by
(topic)) AND (q.memid=m.memid) AND (t.topic=q.topic)


Kindly reply
thanx in advance
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cut and paste the SQL from a debug statement and try running it in Oracle. You've probably missesd a bracket or something, the query itself looks like it is syntactically correct.
 
Kutub Shaikh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Paul,

It was my mistake, I really missed it..
Now it's working fine..

Thanx again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic