Subject Re: weird behaviour
Author Peppe Polpo
Thomas,

> The correct syntax is either
>
> SELECT * FROM FOO(...)
>
> or
>
> EXECUTE PROCEDURE FOO (...) RETURNING_VALUES ....


exactly what I did.

Would you mind to read carefully my message and try to answer again ?

Regards

Peppe Polpo






--- In firebird-support@yahoogroups.com, "Thomas Steinmaurer"
<ts@i...> wrote:
> > I create procedure FOO like:
> >
> > create procedure FOO(Text varchar(100))
> > returns
> > (result varchar(100))
> > as
> > begin
> > result=text;
> > suspend;
> > end !!
> >
> > I test it with
> >
> > select * from foo('a' || 'b')
> >
> > and I get the expected value 'ab'.
> >
> > Now I redefine procedure FOO like:
> >
> > create procedure FOO(Text varchar(100))
> > returns
> > as
> > declare variable result varchar(100);
> > begin
> > result=text;
> > end !!
> >
> > I test it with
> >
> > execute procedure from foo('a' || 'b')
> >
> > and I get the error message "token unknown ||".
> >
> > This looks weird to me...
>
> It looks weird to me how you are using your stored
> procedure. The correct syntax is either
>
> SELECT * FROM FOO(...)
>
> or
>
> EXECUTE PROCEDURE FOO (...) RETURNING_VALUES ....
>
>
> HTH,
> Thomas Steinmaurer
>
> The IB LogManager Product Family
> Logging/Auditing Suite for InterBase/Firebird
> http://www.iblogmanager.com