<?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 Error from proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-from-proc-sql/m-p/868707#M343172</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am getting an error and warning from a proc sql that seems to be rightly coded. Here is the code and my log. Any help is highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. WARNING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table prostate AS&amp;nbsp;&lt;BR /&gt;select distinct PATIENT_ID&lt;BR /&gt;from ao.T01_P01_PROSTATE;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;Here SAS is saying that the use of AS is misspelled. This is the warning in the log&lt;/P&gt;&lt;P&gt;167 proc sql;&lt;BR /&gt;168 create table prostate AS&amp;nbsp;&lt;BR /&gt;___&lt;BR /&gt;1&lt;BR /&gt;WARNING 1-322: Assuming the symbol AS was misspelled as AS&amp;nbsp;.&lt;/P&gt;&lt;P&gt;169 select distinct PATIENT_ID&lt;BR /&gt;170 from ao.T01_P01_PROSTATE;&lt;BR /&gt;NOTE: SAS threaded sort was used.&lt;BR /&gt;&amp;#12;10 The SAS System Saturday, April 8, 2023 01:17:36 PM&lt;/P&gt;&lt;P&gt;NOTE: Table WORK.PROSTATE created, with 53509 rows and 1 columns.&lt;/P&gt;&lt;P&gt;171 quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. ERROR&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table prostate2 AS&amp;nbsp;&lt;BR /&gt;select distinct prostate.PATIENT_ID, bio.lookup_dt, mri, bio.DT_DIAG_PRC, max(mri.lookup_dt) as mri_lookup_dt /*format=mmddyy10.*/&lt;BR /&gt;from prostate&amp;nbsp;&lt;BR /&gt;left join mri on prostate.PATIENT_ID = mri.PATIENT_ID&lt;BR /&gt;left join bio on prostate.PATIENT_ID = bio.PATIENT_ID&lt;BR /&gt;where mri.lookup_dt &amp;lt;= bio.lookup_dt&lt;BR /&gt;group by prostate.PATIENT_ID, mri.PATIENT_ID, bio.PATIENT_ID;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOG&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;173 proc sql;&lt;BR /&gt;174 create table prostate2 AS&amp;nbsp;&lt;BR /&gt;___&lt;BR /&gt;1&lt;BR /&gt;WARNING 1-322: Assuming the symbol AS was misspelled as AS&amp;nbsp;.&lt;/P&gt;&lt;P&gt;175 select distinct prostate.PATIENT_ID, bio.lookup_dt, mri, bio.DT_DIAG_PRC, max(mri.lookup_dt) as mri_lookup_dt format=mmddyy10.&lt;BR /&gt;176 from prostate&amp;nbsp;&lt;BR /&gt;177 left join mri on prostate.PATIENT_ID = mri.PATIENT_ID&lt;BR /&gt;178 left join bio on prostate.PATIENT_ID = bio.PATIENT_ID&lt;BR /&gt;179 where mri.lookup_dt &amp;lt;= bio.lookup_dt&lt;BR /&gt;180 group by prostate.PATIENT_ID, mri.PATIENT_ID, bio.PATIENT_ID;&lt;BR /&gt;ERROR: The value 'PROSTATE&amp;nbsp;'n is not a valid SAS name.&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;181 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/P&gt;</description>
    <pubDate>Sat, 08 Apr 2023 18:40:19 GMT</pubDate>
    <dc:creator>CathyVI</dc:creator>
    <dc:date>2023-04-08T18:40:19Z</dc:date>
    <item>
      <title>Error from proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-from-proc-sql/m-p/868707#M343172</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am getting an error and warning from a proc sql that seems to be rightly coded. Here is the code and my log. Any help is highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. WARNING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table prostate AS&amp;nbsp;&lt;BR /&gt;select distinct PATIENT_ID&lt;BR /&gt;from ao.T01_P01_PROSTATE;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;Here SAS is saying that the use of AS is misspelled. This is the warning in the log&lt;/P&gt;&lt;P&gt;167 proc sql;&lt;BR /&gt;168 create table prostate AS&amp;nbsp;&lt;BR /&gt;___&lt;BR /&gt;1&lt;BR /&gt;WARNING 1-322: Assuming the symbol AS was misspelled as AS&amp;nbsp;.&lt;/P&gt;&lt;P&gt;169 select distinct PATIENT_ID&lt;BR /&gt;170 from ao.T01_P01_PROSTATE;&lt;BR /&gt;NOTE: SAS threaded sort was used.&lt;BR /&gt;&amp;#12;10 The SAS System Saturday, April 8, 2023 01:17:36 PM&lt;/P&gt;&lt;P&gt;NOTE: Table WORK.PROSTATE created, with 53509 rows and 1 columns.&lt;/P&gt;&lt;P&gt;171 quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. ERROR&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table prostate2 AS&amp;nbsp;&lt;BR /&gt;select distinct prostate.PATIENT_ID, bio.lookup_dt, mri, bio.DT_DIAG_PRC, max(mri.lookup_dt) as mri_lookup_dt /*format=mmddyy10.*/&lt;BR /&gt;from prostate&amp;nbsp;&lt;BR /&gt;left join mri on prostate.PATIENT_ID = mri.PATIENT_ID&lt;BR /&gt;left join bio on prostate.PATIENT_ID = bio.PATIENT_ID&lt;BR /&gt;where mri.lookup_dt &amp;lt;= bio.lookup_dt&lt;BR /&gt;group by prostate.PATIENT_ID, mri.PATIENT_ID, bio.PATIENT_ID;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOG&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;173 proc sql;&lt;BR /&gt;174 create table prostate2 AS&amp;nbsp;&lt;BR /&gt;___&lt;BR /&gt;1&lt;BR /&gt;WARNING 1-322: Assuming the symbol AS was misspelled as AS&amp;nbsp;.&lt;/P&gt;&lt;P&gt;175 select distinct prostate.PATIENT_ID, bio.lookup_dt, mri, bio.DT_DIAG_PRC, max(mri.lookup_dt) as mri_lookup_dt format=mmddyy10.&lt;BR /&gt;176 from prostate&amp;nbsp;&lt;BR /&gt;177 left join mri on prostate.PATIENT_ID = mri.PATIENT_ID&lt;BR /&gt;178 left join bio on prostate.PATIENT_ID = bio.PATIENT_ID&lt;BR /&gt;179 where mri.lookup_dt &amp;lt;= bio.lookup_dt&lt;BR /&gt;180 group by prostate.PATIENT_ID, mri.PATIENT_ID, bio.PATIENT_ID;&lt;BR /&gt;ERROR: The value 'PROSTATE&amp;nbsp;'n is not a valid SAS name.&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;181 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 18:40:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-from-proc-sql/m-p/868707#M343172</guid>
      <dc:creator>CathyVI</dc:creator>
      <dc:date>2023-04-08T18:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Error from proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-from-proc-sql/m-p/868708#M343173</link>
      <description>&lt;PRE&gt;167 proc sql;
168 create table prostate AS
                          ___
                          1
WARNING 1-322: Assuming the symbol AS was misspelled as AS .&lt;/PRE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/253321"&gt;@CathyVI&lt;/a&gt; please from now on, paste the log files into the window that appears when you click on the &amp;lt;/&amp;gt; icon, as I have done. This improves the formatting and readability of the log. Do this every single time from now on. Every single time.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaigeMiller_0-1663012019648.png" style="width: 859px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75161i0E71B1489A6C9839/image-size/large?v=v2&amp;amp;px=999" role="button" title="PaigeMiller_0-1663012019648.png" alt="PaigeMiller_0-1663012019648.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem that SAS is indicating is most likely cause by an unprintable character appearing immediately before or after AS. How can that happen? Usually if the code has been copied from some other software or file format which is not a true text editor, such as MS Word, MS PowerPoint, MS Excel or even PDF files. The solution is to erase &lt;FONT face="courier new,courier"&gt;prostate AS &lt;FONT face="arial,helvetica,sans-serif"&gt;and then re-type it manually.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 18:59:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-from-proc-sql/m-p/868708#M343173</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-04-08T18:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error from proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-from-proc-sql/m-p/868710#M343175</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;Thank you. I will always remember to put the code in the insert code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 19:23:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-from-proc-sql/m-p/868710#M343175</guid>
      <dc:creator>CathyVI</dc:creator>
      <dc:date>2023-04-08T19:23:57Z</dc:date>
    </item>
  </channel>
</rss>

