开发者

Firebird unknown token 'into' when using EXECUTE STATEMENT

I use EXECUTE STATEMENT to return values from select like this:

 EXECUTE STATEMENT 'select '||:fl||','||:开发者_高级运维f2||','||:f3||
      ' from tab1 where tab1_ID = '||:f_id
      into :v_f1,:v_f2,:v_f3;

when I try to execute I get unknown token 'into' why is that and how to solve ?

thanks


I believe you are trying to use this in a procedure/trigger in Firebird 1.5, but it's just guessing. A little more detail would help.

Why use "execute statement" and not use PLSQL directly, like:

begin
select fl, f2, f3 from tab1 where tab1_ID = :f_id into :v_f1,:v_f2,:v_f3;
end

assuming you previously declare f_id, v_f1, v_f2, v_f3 as variables or parameters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜