Click here to Skip to main content
16,019,107 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
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 in place of @ID.
Posted
Updated 12-Sep-13 20:19pm
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900