title: How do I run a sub query in SQL Server 2012?
body: <pre><code>SELECT [SKULL].[dbo].[reports].[idnumber], [SKULL].[dbo].[reports].[subid] 
  FROM [SKULL].[dbo].[reports] 
  WHERE reportColumn =  (SELECT DISTINCT(reportColumn)
                         FROM [SKULL].[dbo].[reports] 
                         WHERE [SKULL].[dbo].reports.reportColumn 
                         LIKE '%someword%')
  </code></pre>
  
  <p>I get an error message saying </p>
  
  <pre><code>Msg 512, Level 16, State 1, Line 2
  Subquery returned more than 1 value. 
  This is not permitted when the subquery follows =, !=, &lt;, &lt;= , &gt;, &gt;= or 
  when the subquery is used as an expression.
  </code></pre>
  
  <p>Thanks.</p>