3
Answers

SQL server query Error

Ravi Shakya

Ravi Shakya

11y
833
1
declare @ID as nvarchar(50)=''
SET @ID='1,2,3'
Select * from Orders_tbl where OrderId in (@ID)


Showing An error-

Msg 8114, Level 16, State 5, Line 3
Error converting data type nvarchar to numeric.

But working fine with direct values.

Answers (3)