All Forums General
Prabhu_Teradata 17 posts Joined 06/12
10 Jul 2012
Cast in teradata userdefined function

How to do casting in Userdefined function?

Thanks, Prabhu
Tags:
ulrich 816 posts Joined 09/09
10 Jul 2012

Too unspecific question.

SQL UDF?

Java or C?

What should the fucntion do and why do you want to cast?

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

Prabhu_Teradata 17 posts Joined 06/12
11 Jul 2012

Hi,

 

Teradata version:12

UDF using C

     For EG, the senario is like for 3 values(a,b,c) will be peforming some calculation and the end output d (will be a decimal one) i need to have that in the format of decimal(20,15) (it can be done in the sql part after getting the output from the function) , but is there any posibilty of performing in c program itself??

 

 

 

Thanks,
Prabhu

ulrich 816 posts Joined 09/09
11 Jul 2012

Still not too clear.

I guess you need to spend some time on the UDF manualls.

and maybe

http://developer.teradata.com/extensibility/articles/developing-database-extensions-udfs-etc

could also be a starting point

In generall you define the input and output data types in the create function statement

but you would need to take care in C that your value d is a decimal(20,15) value.

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

You must sign in to leave a comment.