title: SQL Like where the string can be in a randomized order
body: <p>Yes I know this is a terrible thing to ask and a full text index would solve all my problems, but its running on an Azure v11 DB that isn't allowing a full text index and upgrading isn't an option at this time.</p>
  
  <p>What I'm trying to achieve is a search string to be fed in, this is then matched against a string column as a like. However the string being passed in can come in the incorrect order.</p>
  
  <p>As an example</p>
  
  <pre><code>SELECT value
  FROM table
  WHERE value like '%This% %Is% %A% %String%'
  </code></pre>
  
  <p>works fine because the search string is in order, but what I'm sometimes being passed is '%This% %String% %Is% %A%'</p>
  
  <p>resulting in;</p>
  
  <pre><code>SELECT value
  FROM table
  WHERE value like '%This% %String% %Is% %A%'
  </code></pre>
  
  <p>Which will fail to return anything. Is it possible to apply a like when the string can come in any order?</p>
  
  <p>Any other SO posts I found just boiled down to using a Full Text Index, so chances are I've either done something stupid (beyond trying this without full text indexes) or it's not possible.</p>
  
  <p>If anyone can offer some help I'd really appreciate it.</p>
  
  <p>Quick edit as I don't think I explained myself thoroughly;</p>
  
  <p>As en example, the data I'm matching against (still using that '%This% %String% %Is% %A%' search parameter as an example) would be something like this;</p>
  
  <ul>
  <li>'This is a string I want to return' </li>
  <li>'This is a decimal' </li>
  <li>'This integer is a' </li>
  <li>'This Is A Decimal'</li>
  <li>'This is string'</li>
  </ul>
  
  <p>Out of those sample, I would only want to return the first record 'This is a string I was to return', so it's similar to the below answers except that it needs to be done with an AND and the input will vary in length. For instance the input could be</p>
  
  <ul>
  <li>'%This% %String% %Is% %A%'</li>
  <li>'%This% %Is% %A% %String%'</li>
  <li>'%This% %String%' (which would return two of the records)</li>
  <li>'%This% %String% %A%'</li>
  </ul>
  
  <p>Thanks,</p>
  
  <p>Neil</p>