<?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 Re: Proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/752365#M236980</link>
    <description>Move the inner join (and all joins before the WHERE</description>
    <pubDate>Tue, 06 Jul 2021 17:32:51 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-07-06T17:32:51Z</dc:date>
    <item>
      <title>Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/752359#M236976</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; proc sql;
1397  create table DADFY19_int  as
1398  select distinct a.princ_interv_cci_code,a.DAD_TRANSACTION_ID as TXN_ID_AB,
1398! a.ANALYTICAL_INST_TYPE_CODE,
1399  a.ADMISSION_CATEGORY, a.ENTRY_CODE,a.submitting_prov_code, a.PROV,
1400  b.DAD_TRANSACTION_ID,b.INTERV_CCI_CODE, b.INTERV_SEQ_ID, b.EPISODE_SEQ_ID,
1401  b.STATUS_ATTRIBUTE_CODE, b.OOH_IND, b.ANESTHETIC_TECH
1402  from abs_AC_F1920_excl_QC_BC as a
1403  inner join dad19sas.interv as b
1404  on a.DAD_TRANSACTION_ID=b.DAD_TRANSACTION_ID
1405  where b.INTERV_SEQ_ID=1 and b.EPISODE_SEQ_ID=1
1406  and b.INTERV_CCI_CODE not in('','5CA20', '5CA24', '5CA88', '5CA89', '5CA90', 'ZZZZZZZZZZ' )
1407  and UPCASE(b.STATUS_ATTRIBUTE_CODE) NOT IN ('A') and b.OOH_IND not in ('Y')
1408  inner join dad19sas.diagnosis as b
      -----
      22
      76
ERROR 22-322: Syntax error, expecting one of the following: ;, !, &amp;amp;, AND, EXCEPT, GROUP, HAVING,
              INTERSECT, OR, ORDER, OUTER, UNION, |.

ERROR 76-322: Syntax error, statement will be ignored.

1409  on a.DAD_TRANSACTION_ID=b.DAD_TRANSACTION_ID
1410  where substr(diag_icd10_code,1,3)  in ('O04','O07') or substr(diag_icd10_code,1,4) in
1410! ('P964')
1411  ;
1411!  quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any advice on how to correctly join multiple tables?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 17:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/752359#M236976</guid>
      <dc:creator>Baba9</dc:creator>
      <dc:date>2021-07-06T17:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/752365#M236980</link>
      <description>Move the inner join (and all joins before the WHERE</description>
      <pubDate>Tue, 06 Jul 2021 17:32:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/752365#M236980</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-06T17:32:51Z</dc:date>
    </item>
  </channel>
</rss>

