title: CONVERT statement in SAS Proc SQL
body: <p>I'm running the following code, which is supposed to compare two columns of a SAS dataset for me: </p>
  
  <pre><code>PROC SQL;
  
  CREATE TABLE loandata.tv_curve AS
  SELECT DISTINCT CONVERT(INT, srp_contract_lifetime) as srp_contract_lifetime, rpa_tv
  FROM loandata.sas_f_risk_parameter_cn
  WHERE rpa_tv IS NOT NULL
  ORDER BY CONVERT(INT, srp_contract_lifetime);
  
  QUIT;
  </code></pre>
  
  <p>However, when I run this code I get the following error messages: </p>
  
  <pre><code>ERROR: Function CONVERT could not be located.
  ERROR: Function CONVERT could not be located.
  ERROR: The following columns were not found in the contributing tables: INT.
  </code></pre>
  
  <p>How can I convert my srp_contract_lifetime variable into an int correctly?</p>