REGR_COUNT Result Type and Attributes - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The following table lists the data type for the result of REGR_COUNT(y,x).

Mode Data Type
Teradata INTEGER

The result type of REGR_COUNT is consistent with the result type of COUNT for ANSI transaction mode and Teradata transaction mode.

When in Teradata mode, if the result of REGR_COUNT overflows and reports an error, you can cast the result to another data type, as illustrated by the following example.

SELECT CAST(REGR_COUNT(weight,height) AS BIGINT)
FROM regrtbl;
Here are default formats and titles for the result of REGR_COUNT.
  • If operand y is numeric or character, the format is:
    • For Teradata mode, the format is the default format for INTEGER