Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 31 Mar 2005 @ 12:10:18 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Syntax error while creating UDF
 
From:   Ambarish Ranadive

Hi,

While trying to create test UDF, using following create function command, I am getting sysntax error. Can anybody help please,

     create function teradb.tera_stat ()
        RETURNS Integer
        LANGUAGE C
        NO SQL
        SPECIFIC teradb.tera_stat
        RETURNS NULL ON NULL INPUT
        PARAMETER STYLE td_GENERAL
        EXTERNAL NAME 'CS!tera_stat!c:\src\tera_stat.c!F!tera_stat';

The C code in tera_stat.c is

     /* tera_stat.c */
     int tera_stat(vPar1, vPar2)
     int vPar1;
     int vPar2;
     {

       if (vPar1 == 0.10 * vPar2)
       {
        return 1;
       }
       else if (vPar1 == 0.20 * vPar2)
       {
        return 2;
       }
       else
          return 0;
     }

thanks



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016