Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Match *any* three columns

$
0
0

Hi All,

I'm looking for ideas on how to approach this.
Scenario:

Table1: FName, LName, DOB, City, Zip, ...more columns
Table2: FName, LName, DOB, City, Zip, ...more columns-some different than Table1

I need to find all records where (at least) three of *any* of the columns[FName, LName, DOB, City, Zip] match.

The objective is obviously to keep the query as "least expensive" as possible (table1 has >100k records).

Any pointers or suggestions would be much appreciated!
Thx - M.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>