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

Home -> Community -> Usenet -> c.d.o.misc -> Stored Procedure and WHERE IN statement.

Stored Procedure and WHERE IN statement.

From: Tim <enloet_at_hotmail.com>
Date: 28 Jun 2004 10:25:15 -0700
Message-ID: <995d0f2.0406280925.59de48ec@posting.google.com>


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

Original text of this message

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