<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to select a variable with &amp;quot;_XX&amp;quot; by using proc sql? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-select-a-variable-with-quot-XX-quot-by-using-proc-sql/m-p/330933#M62653</link>
    <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to use proc sql&amp;nbsp;to create table by using the following variable? &amp;nbsp;Please let me know how to make SAS recognize the variable names. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table library.text2 as&lt;BR /&gt;select HAVARTH3 _BMI5CAT&amp;nbsp;_SMOKER3&lt;/P&gt;&lt;P&gt;from library.test1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SAS log showes the following error massage:&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a quoted string, !, !!, &amp;amp;, (, *, **, +,&lt;BR /&gt;',', -, '.', /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, AS, BETWEEN, CONTAINS, EQ, EQT, FORMAT,&lt;BR /&gt;FROM, GE, GET, GT, GTT, IN, INFORMAT, INTO, IS, LABEL, LE, LEN, LENGTH, LET, LIKE, LT,&lt;BR /&gt;LTT, NE, NET, NOT, NOTIN, OR, TRANSCODE, ^, ^=, |, ||, ~, ~=.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help. &amp;nbsp;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2017 18:24:39 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2017-02-08T18:24:39Z</dc:date>
    <item>
      <title>How to select a variable with "_XX" by using proc sql?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-select-a-variable-with-quot-XX-quot-by-using-proc-sql/m-p/330933#M62653</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to use proc sql&amp;nbsp;to create table by using the following variable? &amp;nbsp;Please let me know how to make SAS recognize the variable names. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table library.text2 as&lt;BR /&gt;select HAVARTH3 _BMI5CAT&amp;nbsp;_SMOKER3&lt;/P&gt;&lt;P&gt;from library.test1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SAS log showes the following error massage:&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a quoted string, !, !!, &amp;amp;, (, *, **, +,&lt;BR /&gt;',', -, '.', /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, AS, BETWEEN, CONTAINS, EQ, EQT, FORMAT,&lt;BR /&gt;FROM, GE, GET, GT, GTT, IN, INFORMAT, INTO, IS, LABEL, LE, LEN, LENGTH, LET, LIKE, LT,&lt;BR /&gt;LTT, NE, NET, NOT, NOTIN, OR, TRANSCODE, ^, ^=, |, ||, ~, ~=.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help. &amp;nbsp;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 18:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-select-a-variable-with-quot-XX-quot-by-using-proc-sql/m-p/330933#M62653</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-02-08T18:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to select a variable with "_XX" by using proc sql?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-select-a-variable-with-quot-XX-quot-by-using-proc-sql/m-p/330938#M62654</link>
      <description>&lt;P&gt;SQL requires commas whenever you specify a list:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table library.text2 as&lt;BR /&gt;select HAVARTH3&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt; _BMI5CAT&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;_SMOKER3&lt;/P&gt;
&lt;P&gt;from library.test1;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 18:42:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-select-a-variable-with-quot-XX-quot-by-using-proc-sql/m-p/330938#M62654</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-02-08T18:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to select a variable with "_XX" by using proc sql?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-select-a-variable-with-quot-XX-quot-by-using-proc-sql/m-p/330939#M62655</link>
      <description>&lt;P&gt;Sql requires commas to separate elemnt like list of variables:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table library.text2 as
select HAVARTH3,
           _BMI5CAT,
         _SMOKER3
from library.test1;
quit;
 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Feb 2017 18:44:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-select-a-variable-with-quot-XX-quot-by-using-proc-sql/m-p/330939#M62655</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-02-08T18:44:16Z</dc:date>
    </item>
  </channel>
</rss>

