File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Query with Watch "Query with New topic
Author

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

Kutub Shaikh
Greenhorn

Joined: Apr 04, 2005
Posts: 13
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


The Man With The Golden Gun...
Paul Sturrock
Bartender

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
Greenhorn

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

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

Thanx again.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query with 'AND' not running in servlet...