Home » SQL & PL/SQL » SQL & PL/SQL » Using Bind Variable in IN Clause (Oracle 10g, Windows XP)
Using Bind Variable in IN Clause [message #340693] Wed, 13 August 2008 15:39 Go to next message
newbie22
Messages: 3
Registered: January 2008
Junior Member
Hello,

I am trying to use my Bind variable in IN Clause but with no success. The code is below

IF (LENGTH(pREPORT_LEVEL) > 0) THEN
      var_WHERE := var_WHERE || 'F.REPORT_FLAG IN (SELECT FLAG_VAL FROM REPORT_FLAG_LU WHERE LOOKUP_VAL = :14) AND';
    END IF; 


I have created a lookup tables where based on what the user enters, it will return multiples values. Lookup table looks something like this

FLAG_VAL LOOKUP_VAL
S-----------S
N-----------N
M-----------M
N-----------M
R-----------R
M-----------R
N-----------R
So, if a user enters M it needs to lookup values M & N and so on. My package compiles fine but I don't get any data if I enter a value for this parameter.

Thanks a lot!
Re: Using Bind Variable in IN Clause [message #340721 is a reply to message #340693] Thu, 14 August 2008 00:36 Go to previous message
rajatratewal
Messages: 507
Registered: March 2008
Location: INDIA
Senior Member
Show us how you are assigning value to the variable.

This is not the complete code.

Regards,
Rajat
Previous Topic: Number of Months between two different Years
Next Topic: How can we get that Which row is updated or deleted in a table
Goto Forum:
  


Current Time: Wed Dec 07 14:17:07 CST 2016

Total time taken to generate the page: 0.14516 seconds