Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

stored procedure for tagging same contact information

$
0
0
Hi,I'm stumped at how to create a stored procedure that would group and identify contact information. I have a table with the following columnsNamePhone EmailGroup Example of desired outputName Phone Email GroupAlex 123 abc@domain 1Alex 456 def@domain 1Brian 123 ghi@domain 1Carlos 890 ghi@domain 1Diana 777 hij@domain 2first and second row belong to same group because they have similar namethird row is part of first group because phone number matches one of the phones of the first contactfourth row is part of first group because email matches the email address in row 3fifth row is part of a new group because it doesn't match any of the columns

Viewing all articles
Browse latest Browse all 3145

Trending Articles