Sunday, June 17, 2007

 

Arithmetic overflow error converting expression to data type int

In SQL Server I get the following error when I try to COUNT(*) rows in very large tables:

"Arithmetic overflow error converting expression to data type int."

Googling and sifting through pages about the same problem for SUM( ), I found you can use this function:

COUNT_BIG(*)

This uses a bigint rather than int for storage.

Comments: Post a Comment





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]