how to create function with parameters

Database
Enthusiast

how to create function with parameters

Hi,

Please give hints on how to create function with parameters.

Code snipsets would be a great help.

Regards
Nitin Bajaj
4 REPLIES
Enthusiast

Re: how to create function with parameters

There are good examples of UDF's on Teradata's web site. I would take a look at those.
Enthusiast

Re: how to create function with parameters

Barry,

What I have found is that the function code has to be written in language C and then called in Teradata by declaring the same implementation in Teradata.

Even then, I am clueless how to do that. Please help to resolve this issue.

Regards
Nitin Bajaj
Enthusiast

Re: how to create function with parameters

There is an Orange Book available on Teradata's web site that explains this process in detail. It is called "Teradata Database User Defined Function User’s Guide V2R6". It is written by Mike Watzke and Floy Ivie. I would suggest that you start there and then if you have specific questions, ask them in this forum.

The best thing to do is find an example one that you'd like to try to implement and try to get that one working before embarking on writing your own. That way you'll get familiar with the process.

Hope that helps.
Enthusiast

Re: how to create function with parameters

Barry,

Thanks A lot

I would give try to it and come back to you if have any questions.

Regards
Nits