Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Stupid SQL question?
On 9iR2....
Is there a way to use th 'in' clause but comparing to a variable with string value such as
declare
str varchar2(30) := 'A,B,C';
i number;
begin
select count(*)
into i
from mytab
where col in str;
end;
Actually I know this isn't possible but can a similar effect to
..
where col in ('A','B','C')
..
be achieved without supplying a constant to the where clause - for example passing an aray of values for comparison? or do I need to build the SQL dynamically?
ta...
-- jeremyReceived on Tue Mar 08 2005 - 12:11:46 CST
![]() |
![]() |