Saturday, 18 November 2017

MSSQL - Fix Error - Conversion failed when converting the varchar value ' ID is set to: ' to data type int.

Error
Conversion failed when converting the varchar value ' ID is set to: ' to data type int.

Watch solution on YouTube

to fix it replace
Declare @id int = 10
print ' ID is set to: ' + @id
with
Declare @id int = 10
print ' ID is set to: ' + CAST(@id As Varchar)

No comments:

Post a Comment