Subject Re: [IB-Architect] feature request
Author Arno Brinkman
Hi,

> declare a udf to use a stored procedure
> or
> use any stored procedure as a function
>
> for example when i have a simple select on a stored procedure, it
> works in firebird like
>
> select * from stored_proc(param1)
>
>
> the idea is to use the procedure similar to a udf, for example
>
> select sales.*, sp_customer_caption(id_customer) from sales

Isn't simply this an answer to your question :

SELECT
sales.*,
(SELECT caption FROM sp_customer_caption(id_customer))
FROM
sales

> as far as i have tested this, it does not work until now, but it would be
> really
> helpful, especially to avoid a lot of tables used in one select, which
> definitly
> makes problems in the optimizer (a udf only used in the field list does
not
> make changes to the optimizers plan).

Can you give good examples where you think the optimizers mess up the whole
thing ?
Have you tried those queries on FB1.5 beta ?

Regards,
Arno