title: How do you select a record that has 4 digits/characters in a specific field?
body: <p>I need to select all records where there are only 4 digits in a specific field.</p>
  
  <p>I'm using SQL Server.  The WHERE condition is looking at a character field that contains numbers.  I want to select all the records where this field only has 4 numbers.</p>
  
  <pre><code>SELECT * FROM Server.database.schema.table
  WHERE ci_dnis [has 4 characters]
  </code></pre>