Michael Noze
asked on
Extract data when a column's value is in another column
Hi Experts,
I have a table with 2 columns (Last name) and (First name).
I'd like to extract all the first name that has the same value as another column value.
IE:
The db is:
First name | Last name
Olivia Jones
Jones Mertil
Nicholas Jay
Avril Lavigne
Charles Brown
Annie Charles
The result would be the table
First Name | Last Name
Jones Mertil
Charles Brown
Thank you!
I have a table with 2 columns (Last name) and (First name).
I'd like to extract all the first name that has the same value as another column value.
IE:
The db is:
First name | Last name
Olivia Jones
Jones Mertil
Nicholas Jay
Avril Lavigne
Charles Brown
Annie Charles
The result would be the table
First Name | Last Name
Jones Mertil
Charles Brown
Thank you!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just remember, even when JOIN works well in this simple case it will provide duplicate results on output in many other cases...
ASKER
Thank you!
Open in new window
(NOTE: Either method - using IN or JOIN is okay - subject to your data conditions).