October 10th, 2003, 03:48 PM
The IN clause and Stored Procs
I want to pass a variable into a stored proc from a VB dll that is a comma delimited string and put this variable into an IN clause like below.
PROCEDURE GetFolders (i_FOLDERS IN VARCHAR2)
OPEN MyCursor FOR
WHERE MyTable."Folder" IN (i_FOLDERS);
The problem is that no matter what I do it always treats this variable as one big string and does not treat my comma separated folder names in the input as separate, but as one big string. It doesn't matter if I put single or double quotes around the folder names in my variable either. It works fine with just one folder name, but not right with comma delimited folder names. Is there any way to get it to treat my comma delimited input treated as separate values for the IN clause?
October 10th, 2003, 04:49 PM
can't do it that way... you need to use execute immediate or dbms_sql (depending on which version of Oracle)