Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 23 Jun 2006 @ 11:19:10 GMT

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

Subj:   Re: 21 digits number
From:   McCall, Glenn David

What sort of a number is it? Do you need to do arithmetic on it, or simply store it and retrieve it?

You could store it as a varchar(21). If you elect to do so, you will need to ensure that it is right justified with leading blanks or zeros. If not, it won't sort properly.

Another possibility if you are using V2R6.1 is to create a User defined Data type (UDT).

You could even split it into a Decimal (10,0) and Decimal (11,0) or even two integers. As two numbers you could still do arithmetic on it if need be, although it starts to get a little more complicated. The arithmetic techniques are similar to those used in school. Specifically, long addition, long multiplication etc.

If you are interested I can send you an example of addition.

All the best

Glenn Mc

  <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