title: SAS sum variables using name after a proc transpose
body: <p>I have a table with postings by category (a number) that I transposed. I got a table with each column name as _number for example _16, _881, _853 etc. (they aren't in order).</p>
  
  <p>I need to do the sum of all of them in a proc sql, but I don't want to create the variable in a data step, and I don't want to write all of the columns names either . I tried this but doesn't work:</p>
  
  <pre><code>proc sql;
  select sum(_815-_16) as nnl
  from craw.xxxx;
  quit;
  </code></pre>
  
  <p>I tried going to the first number to the last and also from the number corresponding to the first place to the one corresponding to the last place. Gives me a number that it's not correct.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks!</p>