title: Using Wildcards in SQL Where statement
body: <p>I've got the following code:</p>
  
  <pre><code>SELECT ItemName 
  FROM skuDetails 
  WHERE skuDetails.SkuNumber = '" &amp; search &amp; "' 
        OR 
        skuDetails.ItemName = '%' + @search + '%'"
  </code></pre>
  
  <p>Basically I've got a database of items and each item has a "SKU number" which is a unique number for each item. In VB.NET I have a form where you type in either the SKU number or the name of the item into a text box and then press enter to search the database for that number or a similar name to the one you searched.</p>
  
  <p>The "search" variable in the code above is the text in the textbox which the user searches.</p>
  
  <p>The first WHERE statement works but the second after the OR doesn't. I expect it's something to do with how I've used the wildcard. Is there anything wrong with that statement?</p>
  
  <p>Thanks in advance!</p>