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: ;, !, &, 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;Any advice on how to correctly join multiple tables?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.