Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Teradata UDFs

Status
Not open for further replies.

Ssinghal

Programmer
Jun 11, 2003
3
US
I am really new to the world of Teradata, and have a strict deadline to meet! Can anybody help me figure out how to invoke C Preprocessor program with functions for teradata implementation? I wnat to implement The days difference function, but, don't know where to execute or what syntax to follow!
 
Hi,
Teradata supports Date difference function in SQL

sel ( date1 - date 2 );

by default it is displayed in DAYS. If you want a differnt value like Years and MOnths you can

sel ( date1 - date 2 ) year(4) to month;

Are there any other function you think you need to implement.

The reason I ask is Teradata doesn't support ANSI UDF specification YET.

the only way to implement something in C would be to write an application using Embedded SQL retrieve all the rows back and POST process them in the client. this is very slow.
 
Thanks tdatgod,
It really helps me confirm Teradata doesn't support ANSI UDF specification. How to invoke the C application from the teradata SQL Admin., and, where to execute these C lines, to process them in client?
Do I need a C compiler path specified for the teradata server to trace it? For the code with embedded SQL in C,can you point to some relevant documentation which i can make use of to implement my functions (date format,overall number etc.)
Thanks in advance.




 
The manual is "Preprocessor2 Programmer Guide", but there's usually no need for embedded SQL, you can do almost anything with SQL and/or Load Tools and it's typically at least 10 times faster.

Dieter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top