KNOWLEDGE BASE

Error " Runtime Error: Arithmetic overflow error converting expression to data type int" Connecting to MS SQL with Custom SQL


Published: 03 Sep 2014
Last Modified Date: 02 May 2016

Issue

When connecting to Microsoft SQL Server using custom SQL, the following error might occur:

Runtime Error: Arithmetic overflow error converting expression to data type int.

Environment

  • Tableau Desktop 8.2
  • Windows 7
  • Microsoft (MS) SQL Server

Resolution

Option 1

Change the calculation to return a valid number for the column type in the database.

Option 2

Recreate the calculation, wrapping it in the FLOAT() function

Option 3

Work with the database administrator to recast the BIT type of the column in the original data source.

Cause

The returned value exceeds the maximum memory of the type for the column.
Did this article resolve the issue?