Subject | Re: [firebird-support] Procedure as Function calling |
---|---|
Author | Mitchell Peek |
Post date | 2005-05-05T02:49:43Z |
did you try...
select (select result from sqr(T.Val))
from T
where ID=2;
fomin_maxim wrote:
select (select result from sqr(T.Val))
from T
where ID=2;
fomin_maxim wrote:
>Hello!
>
>I have question. I have procedure, for example:
>
>CREATE PROCEDURE SQR(X INTEGER) RETURNS(RESULT INTEGER) AS
>begin
> Result=:x*:x;
> suspend;
>end
>
>I also have table or tables
>
>CREATE TABLE T (
> ID INTEGER,
> VAL INTEGER
>)
>
>Is it possible to call my procedure as function (Informix supports
>this syntax):
>
>select sqr(T.Val) from T where ID=2;
>
>An error was found in the application program input parameters for
>the SQL statement.
>Dynamic SQL Error.
>SQL error code = -804.
>Function unknown.
>SQR.
>
>Currently I use:
>
>select (select * from sqr(T.Val)) from T where ID=2;
>
>Is it the only way to do this? And what about future version?
>
>
>
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Visit http://firebird.sourceforge.net and click the Resources item
>on the main (top) menu. Try Knowledgebase and FAQ links !
>
>Also search the knowledgebases at http://www.ibphoenix.com
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>