Re: Passing nth number of parameters to a procedure

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Thu, 17 May 2001 18:43:38 -0700
Message-ID: <3B047E4A.40743CF7_at_exesolutions.com>


Baba Yetunde wrote:

> Hi,
>
> I have a table with 3 fields:
> ID_no number, preference_name varchar2(10) , pre_value number
>
> What I desire is a procedure, that I can pass n numbers of parameters to. It
> sould first delete all records for the ID_no
> found in the table. then add a row for each parameter passed (i.e ID_no
> number, preference_name varchar2(10) , pre_value number).
>
> What is the best way of doing this?
> Please not the Procedure will be part of a package and will be called from
> an application.
>
> Regards

The best way is to change your specification because what you suggest can't be done. Try this instead ... though it is still limited to a 32K string.

Pass you parameters as a single delimited string. Then, in a loop, unparse the parameters from the string and use native dynamic SQL to execute the required actions.

Daniel A. Morgan Received on Fri May 18 2001 - 03:43:38 CEST

Original text of this message