Subject Re: [firebird-support] Dynamic SQL Error: need help understanding
Author Paul Vinkenoog
Hell Homer,

> if (:VPOS <> 0) then VUSER = substring(VUSER from 1 to (:VPOS - 1));

TO must be FOR:

if (:VPOS <> 0) then VUSER = substring(VUSER from 1 for (:VPOS - 1));

BTW, you can omit the parentheses around :VPOS - 1.
Also, the colons prefixing the variable names are only necessary if you use them inside an SQL statement
(e.g. "select this from that where mypos > :vpos").


HTH,
Paul Vinkenoog