File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to search for an array of values in a Table

 
Robo Fazak
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have an Array of size around 500, which contains bill numbers. I want to search whether these values are in database or not.

I can easily write Select count (id) from Table where BNO=Array [0]; I am using little java also here because I am writing the code in java. But I have to run this query for 500 times if I need to search all values. I can’t use SPs in my application.

So is there any way I can do this in a simple way.

Thanks
 
Tom Reilly
Rancher
Posts: 618
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you considered using an "in" clause in your SQL?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic