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

How to find out if a column value exists in other column

$
0
0
Dear SQL experts,Thanks for looking into my question. I have a scenario where I need to find if values of column-A is part of the values of column-BFor Example, Lets take a table like below, ContactId, Firstname, LastName, Company 1 John Smith ABC Corp2 Steve Davis The Davis consulting, LLC3 Bill Gates MicrosoftI need to write a query, that will return Contactid 2 (because LastName is part of the Company).Please help. Thanks!Siva.

Viewing all articles
Browse latest Browse all 3145

Trending Articles