4 Replies Latest reply: Jul 9, 2014 8:49 AM by Paul Horth RSS

    Oracle IN Operator. Suggest please.

    2616378

      Hi Folks,

       

      I have a Question reagarding Oracle IN Operator:

       

      I am using a function to return multiple ',' separated values which i can take in an IN operator and can execute a query:

       

      BEGIN

      dbms_output.put_line(xx_func644_test(1));

      end;

      output:

      -----------------------------

      '1','8','7','15'

       

      Function is returning correct values. Now i want to take these values to IN operator:

       

      select * from debug_644 where lookup_code in (xx_func644_test(1));

       

      //assuming internal representation as select * from debug_644 where code in ('1','8','7','15');

      // column code is of varchar type.

      But this is not returning any rows....:( (Why ?)

       

      Whereas if i use direct query then it returns rows:

      select * from debug_644 where code in ('1','8','7','15');

       

      Why it is happening like this ? Please Suggest.