Currently have this table, and need to be able to find Sentences that contain the name of a person
ID FIRSTNAME LASTNAME EMAIL PHRASE
-------- --------------- ------------ --------------------------- ---------------------------------------------------------------
1 John Smith [email protected] I'm the same as other people.
2 Sarah Lane [email protected] I'm different from other people
3 Allen Borazt [email protected] I guess I need another job.
4 Mike Himmy [email protected] We have a great time. John Smith really enjoys his time out.
5 Jillian Carters [email protected] What happened to the car?
6 Steven Oarts [email protected] Just chillin' over in the pool
7 Ronald Donalds [email protected] Just in case you were wondering
8 Nancy Arist [email protected] What I really want is Paul Blarts movie.
9 Paul Blart [email protected] I think Nancy Arist hair color is cool.
Right now my query looks like this but it returns "No Rows Selected".
SELECT T.*
FROM Table T
WHERE T.Phrase Like '%' || T.FirstName || '%';
My desired result would look like this.
ID FIRSTNAME LASTNAME EMAIL PHRASE
-------- --------------- ------------ --------------------------- ------------------------------------------------------------------------------------------------------------------------
4 Mike Himmy [email protected] We have a great time. John Smith really enjoys his time out.
8 Nancy Arist [email protected] What I really want is Paul Blarts movie.
9 Paul Blart [email protected] I think Nancy Arist hair color is cool.