[Teradata Database] Numeric overflow occurred during computation.Unable to get catalog string. Connection String

Database
Enthusiast

[Teradata Database] Numeric overflow occurred during computation.Unable to get catalog string. Connection String

Hi Guys

[Teradata Database] Numeric overflow occurred during computation.Unable to get catalog string. Connection String

I am getting the above error when trying to runthe following sql

has anyone come accross it before?

the count works fine when there is no join with any other table

This is the problematic sql

select

a.mn mn,

count(a.userid) UserCount

from

tblUsers a

join tblDate b

on (a.dt = b.dt)

group

Any input will be appreciated

Many thanks

by a.mn

Tags (1)
4 REPLIES
Enthusiast

Re: [Teradata Database] Numeric overflow occurred during computation.Unable to get catalog string. Connection String

Kong,

the only place you could be seeing a numeric overflow looks like the count(), in the query.  TD uses the integer data type and my guess is that you've exceeded the integer bound.  Try casting your cast as a bigint.

Cheers

Enthusiast

Re: [Teradata Database] Numeric overflow occurred during computation.Unable to get catalog string. Connection String

Thanks Vanderberg

I have tried casting it but it is still erroring

cast(count(a.userid) as bigint) UserCount

there are only 468 records in the table

Enthusiast

Re: [Teradata Database] Numeric overflow occurred during computation.Unable to get catalog string. Connection String

Hi,

It should be 

count(cast(a.userid as bigint)) 

But, it is strange that your table has only 468 records, and you are getting this error!

May be your "tblDate" is huge?

Regards,

Enthusiast

Re: [Teradata Database] Numeric overflow occurred during computation.Unable to get catalog string. Connection String

I suspect that Hemanth is on the right track or your join condition is incomplete, causing a cartesian product somewhere...