Subject Re: external functions in stored procedures
Author Eric Merritt
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 07:38 AM 2/01/2005 +0000, you wrote:

> When do see an exception and what is the exception?

At compile time.

ISC ERROR MESSAGE:
Dynamic SQL Error
SQL error code = -804
Function unknown
FLOOR


> >Do I need
> >to declare it within the procedure somehow?
>
> No, only to the database. But maybe you are having difficulties
because
> you tried to compile the procedure before the function declaration was
> committed?

Could be. I can try that again.

create procedure find_numer_denom (tnumer integer, tdenom integer)
returns (numer integer, denom integer)
as
begin
numer = tnumer + 1;
denom = 2 * denom;

while (floor(numer/2) = numer / 2) do
begin
numer = numer / 2;
denom = denom / 2;
end
end