Subject | Re: [firebird-support] Re: Problem when returning values with EXECUTE STATEMENT |
---|---|
Author | Helen Borrie |
Post date | 2009-11-20T12:14:12Z |
At 10:38 PM 20/11/2009, you wrote:
declare variable v1 integer;
declare variable v2 varchar(50);
Sql = Sql || 'returning_values ((:v1), (:v2))';
>create procedure aux_borrame_driver_proc(Par integer)Missing declarations:
>returns
>(
> r1 integer,
> r2 varchar(50)
>)
>as
>DECLARE VARIABLE Sql VARCHAR(1024);
>declare variable Pname varchar(200);
declare variable v1 integer;
declare variable v2 varchar(50);
>BEGINMissing:
> -- get the procedure name from a table
> select p.sql
> from rshk_procedimientos p
> where p.id_procedimiento = 1
> into :Pname;
>
>
> Sql = 'execute procedure ' || Pname || '(';
> Sql = Sql || CAST(Par AS VARCHAR(20)) || ', ' || CAST(Par AS
>VARCHAR(20)) || ')';
Sql = Sql || 'returning_values ((:v1), (:v2))';
> EXECUTE STATEMENT Sql into :r1, :r2;./heLen
>
>END