You can serach in script library of this forum for a function calleddbo.fnParseList which parses a comma seperated list of value into an array of values and use it like this:-SELECT *FROM article aINNER JOIN member mON m.articleid=a.articleidWHERE a.articleid NOT IN (SELECT Data FROM dbo.fnParseList(',',@articleidlist))Alternatively you can also do like thisSELECT *FROM article aINNER JOIN member mON m.articleid=a.articleidWHERE ','+ @articleidlist + ',' NOT LIKE '%,'+ a.articleid + ',%'