Subject | Re: [firebird-support] Using PSQL as a function? |
---|---|
Author | Thomas Steinmaurer |
Post date | 2014-04-17T14:56:26Z |
Sean,
--
With regards,
Thomas Steinmaurer
http://www.upscene.com/
Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.
>> For pre V3, you can use a selectable stored procedure in something calledYes, of course. That's another option. ;-)
>> 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)
--
With regards,
Thomas Steinmaurer
http://www.upscene.com/
Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.