Conversion failed when converting the nvarchar value ... to data type int

The Solution to Conversion failed when converting the nvarchar value ... to data type int is


You are trying to concatenate a string and an integer.
You need to cast @ID as a string.
try:

SET @[email protected]+' AND Emp_Id_Pk=' + CAST(@ID AS NVARCHAR(10))

~ Answered on 2014-02-09 04:10:22


Most Viewed Questions: