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

Home -> Community -> Usenet -> c.d.o.tools -> Select * from Table 1 where Col1 in (VARIABLE1) inside a stored proc.

Select * from Table 1 where Col1 in (VARIABLE1) inside a stored proc.

From: Muon Ngu <muon.ngu_at_boeing.com>
Date: 2000/05/02
Message-ID: <Fty1wy.6EK@news.boeing.com>#1/1

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

Original text of this message

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