Java Implementation - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™
public class AnytypeClass {

   public static java.lang.String jtdany001(java.lang.Object p1) throws Exception
   {
      String returnStr;

      if(p1 instanceof java.lang.Integer)
      {
         returnStr = "Parameter type is Integer";
         return returnStr;
      }
      else
         if(p1 instanceof java.lang.Byte)
         {
            returnStr = "Parameter type is ByteInt";
            return returnStr;

         }
         else
            if(p1 instanceof java.lang.Short)
            {
               returnStr = "Parameter type is Short";
               return returnStr;

            }
            else
               if(p1 instanceof java.lang.Long)
               {
                  returnStr = "Parameter type is BigInt";
                  return returnStr;
               }
               else if(p1 instanceof java.lang.Double)
               {
                  returnStr = "Parameter type is Float/Real";
                  return returnStr;
               }
               else if(p1 instanceof java.math.BigDecimal)
               {
                  returnStr = "Parameter type is Decimal/Numeric";
                  return returnStr;
               }
               else if(p1 instanceof java.sql.Date)
               {
                  returnStr = "Parameter type is Date";
                  return returnStr;
               }
               else if(p1 instanceof java.sql.Time)
               {
                  returnStr = "Parameter type is Time";
                  return returnStr;
               }
               else if(p1 instanceof java.sql.Timestamp)
               {
                  returnStr = "Parameter type is Timestamp";
                  return returnStr;
               }
               else if(p1 instanceof java.sql.Clob)
               {
                  returnStr = "Parameter type is Clob";
                  return returnStr;
               }
               else if(p1 instanceof java.sql.Blob)
               {
                  returnStr = "Parameter type is Blob";
                  return returnStr;
               }
               else if(p1 instanceof java.lang.String)
               {
                  returnStr = "Parameter type is Char/Varchar/Interval";
                  return returnStr;
               }
               else
               {
                  returnStr = "Invalid object type passed.";
                  return returnStr;
               }
   }