Subject Re: Stored procedure with array parameters
Author Adam
--- In, Robert martin <rob@...> wrote:
> Hi
> I need to create a SP that takes 1 or more numeric primary key values
> and returns a result set consisting of data from all values passed. In
> real terms 95% of the time only one value would be passed, however I
> could see potentially say 5 being the max.
> What would be the best way to deal with this?

At the moment (FB 1.x, 2.0.x) there is no such thing as passing an
array into a stored procedure.

The best way would be the one you ruled out without giving reasons.

I think your first option would get messy, with a lot of is not null
tests going on. Your second option is possible, search on
or the archives of this list for a stored procedure that can split a
string into values. You need to watch the string length to make sure
it can hold the maximum number of values