Subject Re: [firebird-support] Can I use a Stored Procedure like a UDF in a Select?
Author Dimitry Sibiryakov
On 24 Feb 2004 at 3:48, volklp30_nz wrote:

>Does anyone know if it is possible to use in Firebird a stored
>procedure like a UDF?

Use sub-selects.

>create procedure concat (param1 varchar(50), param2 varchar(50))
> returns (output_string varchar(100))
>as
>begin
> for select (:param1 || :param2) from rdb$database
> into :output_string do suspend;

???? 8-O

Why not simple

output_string = param1 || param2;
suspend;

>select concat(contact.firstname, contact.surname) contact_name from
>contact;

select (select output_string from concat(contact.firstname,
contact.surname)) contact_name from contact;

SY, Dimitry Sibiryakov.