File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in where clause

 
gaurav chhabra
Ranch Hand
Posts: 109
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello sir
i m using the query....

String q1 = "select id from experience where years =" + name1 & "months ="+name2 ;

it is givig error at "&".plz tell me the exact query....
thank you
gaurav
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by gaurav chhabra:


String q1 = "select id from experience where years =" + name1 & "months ="+name2 ;

it is givig error at "&".plz tell me the exact query....



gaurav '&' is used in VB I think

This should be something like

 
Anandh Ramesh
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

the '&' symbol is not supported by sql. use the word 'and' instead...

all the best...
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic