declare @valu varchar(100);
set @valu=N'1012,1013,1036,1038,1041,1056,1057,1058,1099,1109,1111,1036,1056,1000'
select cID,cCode,cUnit from [university].[Courses_1] where cID IN(@valu) order by studlevel
When I execute this code the error below occurs:
Msg 245, Level 16, State 1, Line 3
Conversion failed when converting the varchar value '1012,1013,1036,1038,1041,1056,1057,1058,1099,1109,1111,1036,1056,1000' to data type int.
Please anyone who have an idea of how solve this problem should help me.