I want to pass a parameter a string link this:
I want to then use the IN operator to search for any of these number in an ID field which is an INT.
MyTable.IntID IN (idsString)
when I pass the string I get the error:
Msg 245, Level 16, State 1, Procedure pMyProc, Line 30
Conversion failed when converting the nvarchar value '3,4,5' to data type int.
The second issue is that this string may also be empty so I want to do :
MyTable.IntID IN ISNULL((idsString), MyTable.IntID)
but this won't even compile.