I have a stored procedure which requires a comman seperated list of variables. This list should then be passed into a Select statement so it looks like this:
@var VarChar(35)
SELECT x FROM z WHERE x IN (@var)
But whenever this is run, I get a error converting the varchar to an int (the field x is an int).
Does anyone know either a way round this or a way to pass the required values through ???
Thanks in advance,
Richard
@var VarChar(35)
SELECT x FROM z WHERE x IN (@var)
But whenever this is run, I get a error converting the varchar to an int (the field x is an int).
Does anyone know either a way round this or a way to pass the required values through ???
Thanks in advance,
Richard