PL/SQL variable number of ORs in SELECT

From: Frank Curti <curti_at_rci.rutgers.edu>
Date: 1997/08/05
Message-ID: <5s7nmm$bkf_at_amenti.rutgers.edu>#1/1


[Quoted] [Quoted] I have a stored procedure that must build cursors based on an input [Quoted] string that contains a variable number of search parameters that are ORed together in a select statement.
[Quoted] [Quoted] For instance if I pass in the string 22;34;67 I would have the following statement
[Quoted] OPEN cursor_name FOR SELECT * FROM my_table WHERE my_num = '22'

[Quoted]    OR my_num = '34' OR my_num = '67';

[Quoted] Can I build this dynamically, in some instances we may have to pass in up [Quoted] to 100 search parameters. I looked at the DBMS_SQL package but was unable [Quoted] to find a way to use it in this case.

Thank you
Frank Curti Received on Tue Aug 05 1997 - 00:00:00 CEST

Original text of this message