This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Query with 'AND' not running in servlet... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Query with Watch "Query with New topic

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

Kutub Shaikh

Joined: Apr 04, 2005
Posts: 13

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

The Man With The Golden Gun...
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

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.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Kutub Shaikh

Joined: Apr 04, 2005
Posts: 13
Thanx Paul,

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

Thanx again.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Query with 'AND' not running in servlet...
It's not a secret anymore!