|
Posted by Roy Harvey on 07/27/06 21:07
Just a thought, but have you considered changing myfunction (or
writing a new version of myfunction) so that the limit is already
applied to the result it returns?
Roy
On Thu, 27 Jul 2006 12:39:34 +0200, Generale Cluster
<alexcarraro@carrarosoftmasters.net> wrote:
>Hello,
>I need to select the minimum between the result of a function and a
>number, but i can't find a smart way. By now I'm doing like the
>following, but I think is very expensive because it evaluates the
>function twice:
>
>select case when (myfunction())<100 then (myfunction()) else 100 end
>
>Any idea is appreciated.
>Thank you
>Regards
Navigation:
[Reply to this message]
|