Subject RE: [firebird-support] Using PSQL as a function?
Author Leyne, Sean
Thomas,

> For pre V3, you can use a selectable stored procedure in something called
> inline select:
>
> select
> t.c1
> , (select rvalue from my_psql_proc(t.c1)) as proc_value from
> mytable t

Another approach, would be to use the SP as a table and join to it, as in:

select
t.c1,
SP. rvalue as proc_value
from
mytable t
LEFT JOIN my_psql_proc( t.c1) SP ON 1 = 1

I feel this is a better option if you want to use the SP value as a SELECT value and WHERE criteria (I have found slightly better performance)


Sean