Archives of the TeradataForum
Message Posted: Thu, 07 Oct 2004 @ 13:15:47 GMT
Is it possible to overload the inbuilt functions like SUM, MAX .etc giving these functions a different behavior.
Say SUM(col1, positive) SUM(col1, even)
I know I can achieve the above by tweaking the WHERE clause OR giving a different name to the function like SUMOFPOSITIVE/SUMOFEVEN but the question is can these inbuilt functions be overloaded.
In the same context would it be possible to have a UDF which would do something like:
Function SUM (column, flag, behavior) If flag = default // i.e. invoke inbuilt sum Return SUM(column) Else // Return based on the behavior - say SUM of positives/even numbers
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|