Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2006

    Unanswered: Procedure In Parameter Problem....

    I am trying to pass in a list of variables:

    'Test1 ','Test2','Test3','Test4'

    I want to use this in a select statement:

    select * from <mytablename> where <myfieldname> in (pInString)

    If I just pass one string Test1, it works fine. If I try to pass the above string it breaks....

    There has to be a way to do this.... Just can't seem to find it..

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    >There has to be a way to do this
    Good luck with your quest, & if you get desperate you could try reading the fine manuals at
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jan 2006
    Problem is, what to search on........

  4. #4
    Join Date
    Jan 2004
    Croatia, Europe
    Provided Answers: 4
    See whether something like this or this suit your needs.

  5. #5
    Join Date
    Jan 2006
    Quote Originally Posted by Littlefoot
    See whether something like this or this suit your needs.
    Looks like this one would work, thanks!

    create or replace type StringTable as table of varchar2(1000);

    CREATE OR REPLACE function f_string_table(
    p_list in varchar2,
    p_delimiter in varchar2 default ',')
    return StringTable is
    v_string long := p_list || p_delimiter;
    v_pos pls_integer;
    v_data stringtable := stringtable();
    v_pos := instr(v_string, p_delimiter);
    exit when (nvl(v_pos, 0) = 0);
    v_data(v_data.count) := trim(substr(v_string, 1, v_pos - 1));
    v_string := substr(v_string, v_pos + 1);
    end loop;
    return (v_data);
    end f_string_table;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts