 <p>I don't remember much but I will try to put the idea (it's something which I had used a long time ago):</p> <ol> <li>Create a table value function which will take the id and phone number as input and then generate a table with id and phone numbers and return it.</li> <li>Use this function in query passing id and phone number. The query is such that for each id you get as many rows as the phone numbers. CROSS APPLY/OUTER APPLY needs to be used.</li> <li>Then you can check for the duplicates.</li> </ol> <p>The function would be something like this:</p> <pre><code>CREATE FUNCTION udf_PhoneNumbers ( @Id INT ,@Phone VARCHAR(300) ) RETURNS @PhonesTable TABLE(Id INT, Phone VARCHAR(50)) BEGIN DECLARE @CommaIndex INT DECLARE @CurrentPosition INT DECLARE @StringLength INT DECLARE @PhoneNumber VARCHAR(50) SELECT @StringLength = LEN(@Phone) SELECT @CommaIndex = -1 SELECT @CurrentPosition = 1 --index is 1 based WHILE @CommaIndex &lt; @StringLength AND @CommaIndex &lt;&gt; 0 BEGIN SELECT @CommaIndex = CHARINDEX(',', @Phone, @CurrentPosition) IF @CommaIndex &lt;&gt; 0 SELECT @PhoneNumber = SUBSTRING(@Phone, @CurrentPosition, @CommaIndex - @CurrentPosition) ELSE SELECT @PhoneNumber = SUBSTRING(@Phone, @CurrentPosition, @StringLength - @CurrentPosition + 1) SELECT @CurrentPosition = @CommaIndex + 1 INSERT INTO @UsersTable VALUES(@Id, @PhoneNumber) END RETURN END </code></pre> <p>Then run CROSS APPLY query:</p> <pre><code>SELECT U.* ,UD.* FROM yourtable U CROSS APPLY udf_PhoneNumbers(Userid, Phone) UD </code></pre> <p>This will give you the table on which you can run query to find duplicate.</p>