Subject Re: [firebird-support] Selecting records based on a list of ids (sp parameter)
Author Rafael Szuminski
One possible way I have found is to create a stored procedure that will accept
the list of ids and the suspend each one of them and then do a inner join
between the table and the sp, but I can't figure out the syntax for taking a
string and splitting it based on a delimiter inside the sp....


Rafael Szuminski wrote:

> Hi,
>
> Question:
>
> What is the preferred way to pass a variable list of record IDs to a stored
> procedure and then return records that are based on the list?
>
> I have tried the usual suspects: Select IN (:list_of_ids) etc. :-)
>
> Here is some background on the issue and perhaps there is a better design solution:
>
> We are trying to port an mssql db to firebird. The overall port is simple but
> for one thing: we have a master/detail level relationship between databases and
> tables in those databases (I know it’s a bad thing, but there are multiple
> business requirements that mandate this design, or better put it’s the lesser of
> the evils). Anyhow, since FB can’t do cross-database joins, we figured we will
> have our client app query the master database for a list of Ids and then pass
> that list to the second database as a string or something similar and basically
> get the recordset that way.
>
> So, is there a better way to do this? If not, how can this be done?
>
> Thanks in advance
>
> Raf
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>

--
Rafael Szuminski
Email:raf@...
Phone:(949)939 - 2458
www.BDCSoftware.com