Subject | Re: [firebird-support] Queries in UDFs |
---|---|
Author | Helen Borrie |
Post date | 2007-11-17T07:16:56Z |
At 05:13 PM 17/11/2007, you wrote:
But the normal way to return a scalar field in a set is simply to use a correlated subquery expression in your dynamic query.
Provide an example of what you want to achieve so that people can share some of their favourite tricks with you. :-)
./heLen
>Hi!Don't. You'll crash Firebird every time you call it.
>
>I would like to write a user-defined function that performs a lookup
>operation on a db table as part of its calculations. I was wondering,
>what would be the best way to achieve this?
>I know that such a functionality could be achieved by writing a storedWell, it is possible. You can write an executable SP that returns a single output field. It's not a function, though it really depends how you want to use it.
>procedure. But it is not possible to use stored procedures that return
>scalars in the same manner as functions, right?
But the normal way to return a scalar field in a set is simply to use a correlated subquery expression in your dynamic query.
Provide an example of what you want to achieve so that people can share some of their favourite tricks with you. :-)
./heLen