title: SQL Server, combining % and [] wildcards in LIKE statement
body: <p>In t-sql, is there a way to do pattern matching in a like statement such that you can search for 1 or more characters in a given set?</p>
  
  <p>To be specific, I'm trying to come up with a LIKE statement that will return strings that begin with 1 or more letters and end in 1 or more numbers.</p>
  
  <p>So these strings should match:</p>
  
  <ul>
  <li>abcd1234</li>
  <li>a1</li>
  <li>abcdef2</li>
  <li>ab123456</li>
  </ul>
  
  <p>And these strings should not match:</p>
  
  <ul>
  <li>abcd</li>
  <li>1234</li>
  <li>abcd1234abcd</li>
  <li>1abcd1</li>
  </ul>
  
  <p>I know you can use the % wildcard to match a string of 0 or more characters, and you can use brackets[] to match a single character in a given set.  But is there any way to combine those so that I can match on 1 or more characters in a given set?</p>
  
  <p>Something like this would be nice, but of course doesn't work:</p>
  
  <pre><code>WHERE ColumnName LIKE '[%a-z][%0-9]'
  </code></pre>
  
  <p>Does anyone know of a solution to this problem? Or is it just not possible in SQL Server?</p>
  
  <p>Thanks,
  Jim</p>