Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Select * from Table 1 where Col1 in (VARIABLE1) inside a stored proc.
I have a simple stored procedure, that I would like to have a passed in string(varchar2) for used in select from where col1 in (var1) in a stored procedure. I've tried everything but doesn't work. Followed is my proc.
Thanks
CREATE OR REPLACE PROCEDURE WSREVSECT_5
pSectNos varchar2,
pRetCode OUT varchar2
)
AS
nCount number;
BEGIN
SELECT count(fksrev) into nCount
FROM SREVSECT
WHERE sectno IN (pSectNos ) /* as in 'abc', 'xyz', '012' */
;
pRetCode:=to_char(ncount);
End; Received on Tue May 02 2000 - 00:00:00 CDT