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

前端 未结 7 1382
我寻月下人不归
我寻月下人不归 2020-12-03 20:54

I created the procedure listed below:

CREATE procedure getdata
(
    @ID int,
    @frm varchar(250),
    @to varchar(250)
)
AS
BEGIN

DECLARE @SQL nvarchar(5         


        
7条回答
  •  眼角桃花
    2020-12-03 21:13

    You got this Error because you tried to convert column DataType from String to int which is

    leagal if and only if

    you dont have row in that table with string content inside that column

    so just make sure your previously inserted Rows is compatible with the new changes

提交回复
热议问题