Stored Procedure input parameters with more than one value

Asked

Viewed 276 times

0

I need to do a stored project in the oracle where I have 5 input parameters and 1 output parameter which will be a cursor(recordset). The problem is that each input parameter can receive more than one value, i.e., a list of values. These received parameters will be used as a filter in my WHERE clause.

For example, one of the input parameters will be p_customerID and this parameter can receive "ID001, ID002, ID003..." and in the return cursor select I must filter these Ids:

WHERE CUSTOMER in p_customerID

My doubts:

  • How do I receive a list of values in a single parameter (in my case the 5 input parameters can receive 1 or more values )

  • how I can use this parameter in WHERE to filter past values as a parameter.

Obs: This precedent will be called by an external system and will receive the cursor(recordset/refcursor) as return.

  • Check this https://www.devmedia.com.br/forum/parametro-para-sql-com-mais-de-um-valor/322419 I actually found this solution on Asktom and I didn’t credit this page, also on https://forum.imasters.com.br/topic/289781-concatenar-values/

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.