Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Stored Procedure and WHERE IN statement.
Hi, I have a stored procedure where I'm trying to pass in the string
"11761, 13870, 11762, 13053, 12845" of numbers (P_Dept_Id) into a
WHERE IN statment.
The IN statement treats P_Dept_Id as a string rather than individual integers which my goal is. Can somebody tell me what I'm doing wrong here?
...
P_Dept_Id IN VARCHAR2,
...
--Doesn't work
SELECT Section_Id FROM Section
WHERE Parent_Id in (P_Dept_Id)
--DOES work
SELECT Section_Id FROM Section
WHERE Parent_Id in (11761, 13870, 11762, 13053, 12845)
Received on Mon Jun 28 2004 - 12:25:15 CDT