Archives of the TeradataForum
Message Posted: Thu, 31 Mar 2005 @ 12:10:18 GMT
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
|