Avatar of Clifton Bardwell
Clifton Bardwell
Flag for United States of America asked on

Searching for Records With First And Last Names

I have two tables something like this:

Table_1
President          Term
George Washington  1789-1797
Adams, John        1797-1801
Thomas Jefferson   1801-1809
James Madison      1809-1817
Monroe, James      1817-1825
John Quincy Adams  1825-1829

Open in new window


Table_2
LastName    FirstName    Party
Washington  George       Independent
Adams       John         Federalist
Jefferson   Thomas       Democratic-Republican
Madison     James        Democratic-Republican
Monroe      James        Democratic-Republican
Adams       John Quincy  Democratic-Republican

Open in new window


What I'm looking for is a query that will return records from Table_1 where there's a match (by FirstName and LastName) in Table_2.

The hitch in this here giddy up is that the names in Table_1 might be First-Last or Last-First (and, in the real data, there might be a salutation of Mr., Ms, or Dr.)

TIA
Microsoft SQL Server 2005

Avatar of undefined
Last Comment
Clifton Bardwell

8/22/2022 - Mon
PortletPaul

Are the titles ONLY Mr., Ms, or Dr. ?
ASKER CERTIFIED SOLUTION
chaau

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Clifton Bardwell

ASKER
That seems to work.  Thanks.  :-)
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck