Subject Re: [firebird-support] Stored procedure with array parameters
Author Robert martin
Great idea :)

Will give it a go.

Thanks

Rob Martin
Software Engineer

phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com

Wild Software Ltd



Leyne, Sean wrote:
> Rob,
>
>
>> Should I
>>
>
>
>> B) pass in one string parameter that has comma seperated values. I
>>
> like
>
>> this but am not sure of the syntax required to break then numbers out
>> (just using the std FB dlls)?
>>
>
> Consider:
>
> CREATE PROCEDURE TEST(
> ID_List VarChar( 10000)
> ) RETURNS (
> ...
> )
> AS
> Declare Variable SelectStatement VarChar( 20,000)
> BEGIN
>
> SelectStatement = '
> SELECT
> ...
> FROM
> Table
> WHERE
> ID in (' || ID_List || ')';
>
> FOR
> EXECUTE STATEMENT SelectStatement
> INTO
> ...
> DO
> BEGIN
> ...
> SUSPEND;
> END
> END
>
>
>
> Sean
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>