Paul Maddox

Software development team leader specialising in Microsoft Visual C# and C++ from the Northwest of England. Experience working in a globalised business and team; understanding of enterprise business operation and practices; experience reporting to executive management Skills in numerous languages and technologies; knowledge of formal software development lifecycle; experience of architecture design

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.

0 Comments:

Post a Comment

<< Home