title: Search FirstName and LastName Using Like Statement in SQL Server
body: <p>When trying to search with the random words I'm not getting the actual output as expected in some scenarios. Kindly help me solving the same.</p>
  <p>Thanks in advance!!</p>
  <pre><code>declare @FirstName varchar(100) = 'Tim cook'
  declare @LastName varchar(100) = 'Apple'
  Select @FirstName + ' ' + @LastName AS UserName
  where @FirstName + ' ' + @LastName  LIKE '%Tim%'
  </code></pre>
  <blockquote>
  <p>Output - Tim cook Apple</p>
  </blockquote>
  <pre><code>declare @FirstName varchar(100) = 'Tim cook'
  declare @LastName varchar(100) = 'Apple'
  Select @FirstName + ' ' + @LastName AS UserName
  where @FirstName + ' ' + @LastName  LIKE '%cook Apple%'
  </code></pre>
  <blockquote>
  <p>Output - Tim cook Apple</p>
  </blockquote>
  <pre><code>declare @FirstName varchar(100) = 'Tim cook'
  declare @LastName varchar(100) = 'Apple'
  Select @FirstName + ' ' + @LastName AS UserName
  where @FirstName + ' ' + @LastName  LIKE '%Tim Apple%'
  </code></pre>
  <blockquote>
  <p>Output - Empty</p>
  </blockquote>
  <p>Expected Output - Tim cook Apple</p>
  <p>Here there will be a space used as a separator between Tim and cook.</p>
  <p>Is there any possibilities, that when I take the first word in the FirstName and the LastName for searching
  so that my return value is the same as the previous output's...?</p>