How to SELECT a PROCEDURE in Firebird 2.5

前端 未结 8 1350
误落风尘
误落风尘 2021-01-11 23:21

I\'m using Firebird Embedded v2.5. How to use procedures in query (SELECT) ?

My procedure:

SET TERM ^ ;
CREAT         


        
8条回答
  •  心在旅途
    2021-01-11 23:46

    You can't call stored procedures in Firebird's select list. You have to write the selectable procedure with desire result or write an UDF function to do what you have in fn_test procedure.

    For your case the simplest way is:

    SELECT some_table_field_1, 
           5 AS zzz, 
           some_table_field_2,
           ( some_table_field_2 + 1) AS field_2_modified
    FROM   tb_test
    

提交回复
热议问题