|
|
Archives of the TeradataForum
Message Posted: Mon, 13 Sep 2004 @ 16:58:43 GMT
Subj: | | Re: Errors: Right truncation of string data & Interval field overflow |
|
From: | | Victor Sokovin |
Fred,
| I'm trying to get a list of card numbers and ages from a Teradata database. I have two input fields: cardno which is a float field and DOB
which is date field. | |
Regarding the age: do you get the same error if you omit YEAR? If so, you are probably exceeding the max value for SMALLINT (default type
of date differences), which is just above 32,000. Such a difference is internally the number of days between the dates, so customers of 90+ years
of age could be "responsible" for the problem. Are you familiar with the EXTRACT function? It works as SELECT EXTRACT(YEAR from date_of_birth).
Perhaps you could use it for your calculations.
CARDNO: try to cast to a wider string, perhaps varchar(20) instead of varchar(12). If it helps, you can investigate exceptional card
party_account_no by looking at their length after the CAST.
Regards,
Victor
| |