Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 01 Aug 2005 @ 15:34:32 GMT


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


Subj:   Writing UDF for Numeric Datatypes
 
From:   Alexander T

Does anyone know the internal storage for Numeric Datatypes.

I want to write a function which takes two numeric datatypes and returns the greater one or 0 according to a condition.

It should be able to support any numeric with variable precisions.

How will I will be able to do that ?

Also I would like to write a to_char function which takes a numeric type and returns the result in varchar.

The cast function will return with a dot. I don't need that .

It should work exactly as the to_char function in oracle.

For eg :

If we have column with type NUMERIC (10, 5) and the actual value in the column is say 105

Then in Teradata will return in teradata as 105.00000 but i need the value as 105 itself.

If anyone knows the internal storage of the teradata Numeric types and how it gets intrepreted , please help.

Not really getting the storing part in the structure DECIMAL8.


Thanks & Regards

Alexander



     
  <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: 15 Jun 2023