You could pass the different words as a comma separated string, and parse the string with the following UDF:CREATE FUNCTION fnTableFromCSV( @theString varchar(1000), @separator char(1))RETURNS @Values TABLE (value INT)ASBEGIN DECLARE @seppos INT DECLARE @curval VARCHAR(1000) SET @theString = @theString + @separator WHILE PATINDEX('%' + @separator + '%' , @theString) <> 0 BEGIN SELECT @seppos = PATINDEX('%' + @separator + '%' , @theString) SELECT @curval = LEFT(@theString, @seppos - 1) INSERT @Values VALUES (@curval) SELECT @theString = STUFF(@theString, 1, @seppos, '') END RETURNEND I think you get the idea[edit]forgot to credit graz for the function...[/edit]Edited by - Peter Dutch on 04/07/2003 09:19:44