Subject | RE: [firebird-support] Stored procedure with array parameters |
---|---|
Author | Leyne, Sean |
Post date | 2007-07-23T23:25:54Z |
Rob,
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
> Should Ilike
> B) pass in one string parameter that has comma seperated values. I
> this but am not sure of the syntax required to break then numbers outConsider:
> (just using the std FB dlls)?
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