title: SELECT SUM() FROM (SELECT (SELECT ())
body: <p>I have a correct working T-SQL-script in this form</p>
  
  <pre><code>SELECT  columnA
          AS
          'numbers'
  FROM    tableA
  WHERE   clause
  </code></pre>
  
  <p>This script gives me as one column, called numbers, of integers. I want to sum these.</p>
  
  <p>Calling the above lines 'script' I tried the following setup</p>
  
  <pre><code>SELECT  SUM(numbers)
  FROM    (
              script
          )
  </code></pre>
  
  <p>Reading <a href="https://stackoverflow.com/questions/10439122/select-count-from-select">select count(*) from select</a> I supposed this to work, however, it does not. I keep getting "Incorrect syntax near."</p>
  
  <p>I do not know if it is important but that is here named columnA is itself maked by a SELECT statement.</p>