Hi,
I need help in getting this function,
In oracle, least(2, 5, 12, 3) would return 2
Do we have similar function in TD or how do we do.
Thanks for Regards, TDHelp
|
0
|
|
|
|
|
1
|
Teradata doesn't have a built-in least function. You could have your DBA install the Teradata UDFs for popular Oracle functions pack that contains a least() function, although that UDF only handles two arguments. If you are going to keep doing a lot of Oracle-like stuff, it might be a good idea to install this pack anyway. To apply the two-argument UDF least to more arguments, you can do:
You could also use a CASE statement like this:
And so on, but the number of lines of code you have to write becomes big really fast if more values need to be compared. |
||
|
|