• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic