Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> WHERE IN (v_SomeVariable)

WHERE IN (v_SomeVariable)

From: Tom Dyess <nospam_at_nospam.spm>
Date: Thu, 16 May 2002 15:07:09 -0400
Message-ID: <ac100v$nje$1@news.gate.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US