Proc SQL;
create table moth as
Select distinct a.motherid, a.perid as kidid,
a.tage as kidage, a.esex as kidgender, a.EHLTSTAT as kid_currhealth ,
a.EHOSPNIT as kid_nightsinhosp, a.EVISDOC as kid_docvisit
from momkid a, wave5top b
where a.motherid=b.perid
and a.tage lt 18
order by a.motherid, a.tage;
Quit;
Th log is not showing any errors its just showing 0 observations
0 rows 7 columns
No records met your WHERE criteria. Without seeing the data hard to tell if there is any error or not.
Check if you have kidid in table momkid ? (a.kidid = b.kidid)
Some Possible causes
1) No matching Momid = Perid
2) no tage lt 18
or
3) None of the matching Momid=Perid have tage lt 18
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 save with the early bird rate—just $795!
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.