Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> WHERE IN (v_SomeVariable)
Hi all,
I'm helping someone with a PL/SQL script and I'm a little rusty. I'm trying to create a dynamic cursor that uses the WHERE IN () clause with a variable which is a varchar2 that is a comma delimited list of single quoted strings - ie
'00002020','00004808','00002962'
And the SQL/Cursor looks like this
INSERT INTO SOMETABLE
SELECT key_date, fdate
FROM DATES
WHERE dat.key_date IN (v_SomeVar);
but this isn't returning any results. What is the best way to create a dynamic SQL statement using the WHILE clause with an IN modifier?
Thanks,
Tom
Received on Thu May 16 2002 - 14:07:09 CDT
![]() |
![]() |