I am querying a linked SQL Server and not getting an error that I do get when querying locally.
Something like this:
SELECT CAST(ColumnName AS INT) FROM TableName
and this:
SELECT CAST(ColumnName AS INT) FROM ServerName.DatabaseName.Schema.TableName
The first query when run locally returns an error 'Arithmetic overflow error converting expression to data type int.' because some values are out of range.
However, the second query running from a different server, simply returns all the 'valid' rows.
I expect that this is working as designed, but I have googled and cannot find anywhere that explains the difference in behaviour when querying locally versus distributed. Can anyone point me in the right direction? I'd also like to know if there is some configuration option that would change this.
Thanks in advance.