Java Method Implementation - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
Product Category
Teradata Vantage™
public class UDFExample {
   public static Integer fact( Integer x ) {
      if (x == null)
         return null;
      int x_t = x.intValue();
      if (x_t < 0)
         return new Integer(0);
      int factResult = 1;
      while (x_t > 1) {
         factResult = factResult * x_t;
         x_t = x_t - 1;
      }
      return new Integer(factResult);
   }
}