Subject Re: [ib-support] Functions
Author Sandeep
On 16 Oct 2001, at 18:21, Ann W. Harrison wrote:

> At 10:41 AM 10/17/2001 +1300, Sandeep wrote:
> >Is there any way of declaring ones own function (not external) like
> >Upper, cast, stc in database. What I want is a way to have the
> >following statement:
> >
> >select * from tableA a
> >where a.Field = functionA (Val);
> >
> >where functionA returns some value based on input parameter Val.
>
> Yes ... depending on what you mean by "external" or what you mean by
> "any way." There is a user defined function mechanism that is a
> standard part of the product. Those functions are "external" -
> meaning not compiled into the server - but executed on the server
> side and reasonably efficient.
>
> If that's too "external", the source is available (I'd use the
> Firebird source) and you can modify it as you wish.

I didn't mention that functionA is (like a stored procedure) defined as

select Field1 from Table1
where <some condition>

Regards

Sandeep

Software Developer
CFL
sandeep@...
http://www.cfl.co.nz