Archives of the TeradataForum
Message Posted: Wed, 27 Nov 2002 @ 18:29:46 GMT
Since an integer can be slightly more than 2,000,000,000 you have to account for 10 digits (characters) + it can be a negative number. So, if a negative number is allowed in the domain for the column, that CHAR(11) is the maximum that you can allow.
However, when going from CHAR to INT, you probably need to make sure that your character number does not contain anything besides 0-9 and a sign. Additionally, it may not contain a number larger than the largest possible integer.
If you need a larger number, instead of converting to INT you will need to convert to DEC(?,0) where ? is the number of digits you need.
Side note, why are you building a table with the intention of converting? If you are going to need a numeric value, it makes no sense to store it in Teradata as a character. That's my 2 cents.
Hope this helps,
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|