Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Mon, 13 Sep 2004 @ 16:58:43 GMT

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

Subj:   Re: Errors: Right truncation of string data & Interval field overflow
From:   Victor Sokovin


  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.



  <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