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

Oracle PL/SQL Problem with Dynamic Bind Variables (Multiple)

 
Jigar M Gohil
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Issue:
When I use only first filter of FIRSTNAME with Bind variable it works fine but when I use more than one bind variable with LIKE operator it fails.



Any Help?

Thanks in Advance!!!
Jigar.
 
Jigar M Gohil
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got the root cause. The problem was with number of Bind variables I was applying with USING.
Instead of just single use of approver with USING I have to use it for each bind (here twice).



This raised another question: is there a way to re-use the repeated bind variables? (similar to what I was trying earlier)
 
Martin Vajsar
Sheriff
Pie
Posts: 3747
62
Chrome Netbeans IDE Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats for nailing it down!

This is just a proof of concept, right? Otherwise you could use static SQL in this case.

Edit: I've originaly overlooked your question:
Jigar M Gohil wrote:This raised another question: is there a way to re-use the repeated bind variables? (similar to what I was trying earlier)

Not in your case. See the documentation.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic