Subject | RE: [firebird-support] Using PSQL as a function? |
---|---|
Author | Leyne, Sean |
Post date | 2014-04-17T14:35:04Z |
Thomas,
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
> For pre V3, you can use a selectable stored procedure in something calledAnother approach, would be to use the SP as a table and join to it, as in:
> inline select:
>
> select
> t.c1
> , (select rvalue from my_psql_proc(t.c1)) as proc_value from
> mytable t
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