• Dear Frnd,

    You can achieve ur requirement through the following way,

    Declare @s-2 varchar(100)

    Set @s-2 = 'Subbu,Subbiah'

    select * from employee WHERE namess in ( SELECT value COLLATE DATABASE_DEFAULT FROM SplitList(@s , ',') )

    First Declare the variable with the PARAMETERS u need

    Then give the following line in WHERE CLAUSE

    SELECT value COLLATE DATABASE_DEFAULT FROM SplitList(@s , ',')

    SplitList is a function. I had given the funtion

    Create FUNCTION [dbo].[SplitList]

    (

    @List nvarchar(2000),

    @SplitOn nvarchar(5)

    )

    RETURNS @RtnValue table

    (

    Id int identity(1,1),

    Value nvarchar(100)

    )

    AS

    BEGIN

    While (Charindex(@SplitOn,@List)>0)

    Begin

    Insert Into @RtnValue (value)

    Select

    Value = ltrim(rtrim(Substring(@List,1,Charindex(@SplitOn,@List)-1)))

    Set @List = Substring(@List,Charindex(@SplitOn,@List)+len(@SplitOn),len(@List))

    End

    Insert Into @RtnValue (Value)

    Select Value = ltrim(rtrim(@List))

    Return

    END

    Please let me know, it helped u r nt