Archives of the TeradataForum
Message Posted: Mon, 13 Sep 2004 @ 15:15:59 GMT
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. My syntax is:
sel 'XXXXXXXX'||substr(cast(g.party_account_no + 100000000000 as varchar(12)),2,11) as card_no, current_date - a.date_of_birth year as age from custs ;
Where XXXXXXXX is the card_no prefix. The card_no bit is generating a "Teradata row not delivered (trget): Right truncation of string data" error, while the age bit is generating a "Teradata row not delivered (trget): Interval field overflow" error.
Anyone know what I'm doing wrong?
(Apologies if I'm being obtuse, I very rarely use interval functions)
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|