Subject | Re: Is there a way to pass a result set as a parameter? |
---|---|
Author | Eduardo A. Salgado |
Post date | 2008-05-09T19:34:05Z |
> Hi, you could make it work with "execute statement" which allowsyou to execute dynamically created sql in strings.
>this:
> If you use 2.1 I would recommend creating a GTT, something like
> create global temporary table ids(id integer not null) on commitdelte rows;
>same transaction execute a procedure. After you commit all rows will
> then you modify your procedure like this:
>
> CREATE PROCEDURE UpdateByParentID (AValue integer)
> AS BEGIN
> UPDATE SomeTable SET SomeColumn = :AValue
> WHERE ParentID in (select id from ids);
> END;
>
> With setup like that, you can insert ids into a gtt, and withing
be deleted from gtt.
> Check the docs for more info.Sasha and Martijn,
>
> Sasha
Thanks!
Your input works great!
-Eduardo