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

前端 未结 7 1389
我寻月下人不归
我寻月下人不归 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:24

    Try Using

    CONVERT(nvarchar(10),@ID)
    

    This is similar to cast but is less expensive(in terms of time consumed)

提交回复
热议问题