Hello,
Not sure to get your point correctly, but I guess you could play around with a outer join on the same table (using 2 different aliases and removing duplicates afterwards) and then check your result table against input entries to find out if you have a full match or not. In other words, with PETER, PAUL, MARY you will get 3 entries with the same lastname (means it's a match); With PETER, MARY you will get the same 3 entries (so 2 input for 3 given in the result set, so no matching), ...
Br,
Manu.