When I execute a Store Procedure via 'EXEC sp_XXX @p1, @p2' I'm getting this error 'Error converting data type nvarchar to numeric'.
After diggin into the TSQL code I have found that there's a field (type: nvarchar(200)) breaking the execution and resulting on the error.
If I query the table and the specified field with the same parameters as the Store Procedure the results are ok! If I execute the same code as the Store Procedure with the same parameters values the results are ok. The error only happens when
executing the Store Procedure.
Any idea ?
Thanks in advance,
If I cast the field to a smaller size value, as nvarchar(80), it works, but of course with data truncation.
View Complete Post