Archives of the TeradataForum
Message Posted: Tue, 03 Jun 2003 @ 13:53:20 GMT
| Subj: || || Re: Overflow on count(*) in queryman, bteq, wddi |
| From: || || Chauhan, Amit |
ANSI mode uses DECIMAL because Teradata tables frequently have a cardinality exceeding the range of INTEGER. Teradata mode uses INTEGER
to avoid regression problems. When in Teradata mode, if the result of COUNT overflows and reports an error, you can change the script to
use CAST, as illustrated by the following example.
SELECT CAST(COUNT(*) AS DECIMAL(15,0) FORMAT 'Z(14)9')