Special character in stored procedure
<p>I want to use a SQL procedure to pull the data from SQL to SAS EG.</p>

<p>But a value in one parameter (INVNO)is TN/2015-16/0005-13 ie special character.  </p>

<p>This is causing an error:</p>

<blockquote>
  <p>ERROR: CLI prepare error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '/'.
  SQL statement: execute SAS_INV_RPT AMRUTFAC, SDAB, 1, TN05/000023/14-15, TN05/000024/14-15.</p>
</blockquote>

<p>Can anyone come up with a workaround for this?</p>

<pre><code>PROC SQL; 
   CONNECT TO ODBC (DSN='AHCLOD' uid=&amp;uid pwd=&amp;pwd); 
   CREATE TABLE sas_inv_rpt AS 
   SELECT * FROM connection to ODBC (
      execute SAS_INV_RPT 
         &amp;COMPANY_CODE, 
         &amp;LOCATION_CODE, 
         &amp;LANG_ID, 
         &amp;INVNO_min, 
         &amp;INVNO_max); 
   DISCONNECT FROM ODBC; 
QUIT;
</code></pre>

<p>Also can I use range for text value with INVNO_min and INVNO_max prompts</p>