I would like to combine FirstName and LastName into one column named 'FULL NAME' and do a search using LIKE in SQL.
Example 1:
Name: Milan
LastName: Patel
FullName: Milan Patel
Search with: Like '%SomeText%'
Example 2:
Title: "Meetings: A Practical Alternative to Work."
Search: I would like to find the whole word in the input line. ex: work should return the above header.
Here is what I still have.
SELECT CE.Title, CC.FirstName + ' ' + CC.LastName AS FullName FROM EntryTable CE JOIN UserTable CC ON CE.EntryId = CC.USerId WHERE CC.FirstName LIKE 'n%'
EDIT
I get it there slowly. search works with this query.
SELECT CE.Title FROM EntryTable CE JOIN UserTable CC ON CE.EntryId = CC.USerId WHERE CC.FirstName + ' ' + CC.LastName LIKE 's%'
BUT it only searches for a name starting with 's' , I would like to search for a name, starting, ending, also contains conditions. how can i get around this. please, help
source share