Subject | Re: Stored procedure with array parameters |
---|---|
Author | Adam |
Post date | 2007-07-23T23:09:43Z |
--- In firebird-support@yahoogroups.com, Robert martin <rob@...> wrote:
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 fbtalk.net
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
Adam
>At the moment (FB 1.x, 2.0.x) there is no such thing as passing an
> 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?
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 fbtalk.net
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
Adam