PL/SQL Help! Trying to Use Variable String as Argument in "where in" clause
From: Alan Slay <theslays_at_mindspring.com>
Date: Tue, 19 May 1998 02:21:58 GMT
Message-ID: <3560ec9b.112905855_at_news.mindspring.com>
[Quoted] Please email any responses to als_at_akc.org
Date: Tue, 19 May 1998 02:21:58 GMT
Message-ID: <3560ec9b.112905855_at_news.mindspring.com>
[Quoted] Please email any responses to als_at_akc.org
Thank you in advance for your help
[Quoted] I'm trying to use a variable defined as a string of values in a SQL select statement. So far, defining a variable as a string of values works when I run the SQL but doesn't select anything when I try to execute the same statement as part of a PL/SQL procedure's cursor. Any tips?
Example:
IF some_condition = 1 then
v_string := '''A'',''B'',''C'''; ELSIF some_condition = 2 then
v_string := '''D'',''E'',''F''';
ELSE v_string := '''G'',''H'',''I''';
END IF;
Select 'x'
from my_table
where my_field in (v_string);
Received on Tue May 19 1998 - 04:21:58 CEST