proc sql;
create table JDC_Graduation as
select T2.MAJOR_CODE,
count(distinct T1.UID) as InitialCohort,
count(distinct T2.BA_GRAD_4_YEAR) as BA_4_YEAR,
(calculated BA_4_YEAR/calculated InitialCohort)*100 as JDC_GRAD_Rate_4YR,
count(distinct T2.BA_GRAD_5_YEAR) as BA_5_YEAR,
(calculated BA_5_YEAR/calculated InitialCohort)*100 as JDC_GRAD_Rate_5YR,
count(distinct T2.BA_GRAD_6_YEAR) as BA_6_YEAR,
(calculated BA_6_YEAR/calculated InitialCohort)*100 as JDC_GRAD_Rate_6YR
from Work.Journalism_Graduation (where=(STU_RECENT_ADM_TYP ='B' AND MAJOR IN ('MJM', 'MDJ', 'COM','MAS','JMS'))) T1
LEFT JOIN Work.Journalism_Graduation (where=(MAJOR_CODE IN ('MJM', 'MDJ', 'COM','MAS','JMS'))) T2 ON TI.UID = T2.UID
GROUP BY T2.MAJOR_CODE;
quit;
I need help with this error message in sas log. How should I fix the syntax? Thanks.
First, correct the typo TI → T1. Then rerun the code and check the log again.
First, correct the typo TI → T1. Then rerun the code and check the log again.
Thanks. It is a typo that I did not notice.
From now on, please do not provide logs as screen captures. The better way to provide the log is to ccopy it as text, and then paste it into the window that appears when you click on the </> icon. This would make everyone happier.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.