Subject Re: UDF in EXECUTE STATEMENT
Author Leonardo Cosmai
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@...> wrote:
>
> Hi,
>
> > I've this simple store procedure:
> >
> > ....
> > FOR EXECUTE STATEMENT
> > 'SELECT
> > STRLEN(ANA00CDFS)
> > FROM
> > ANA00'
> > INTO
> > :ANA00CDFS
> > DO BEGIN
> > ...
> >
> > Firebird (1.5.2 on a debian sarge) goes in error with:
> >
> > Variable type (position 0) in EXECUTE STATEMENT 'SELECT
> > STRLEN(ANA00CDFS) ' INTO does not match return.
>
> Sounds like :ANA00CDFS isn't of the same type as what the UDF
> returns.
>
> Martijn Tonies

You are right!!!!. Really the original statement is

'...SELECT SUBSTR(ANA00CDFS, 0, 9).....' INTO :ANA00CDFS

if I declare ANA00CDFS as VARCHAR (any size), the store procedure goes
in error, if I declare ANA00CDFS as CHAR (any size) is ok. Strange.


Thanx.
Ciao.
L.