To Whom it may concern: I am trying to do a full join and below is my syntax: proc sql;
create table Monthly as
SELECT c.*, d.*
FROM careods.Care_deaths c Full Join Mthdthrp.dthr717 d
on input(c.care_id, $8.) = d.care_id and c.lastup_DT = d.DOS
order datepart(c.lastup_DT) Between '17JUL2018'd and '17JUL2019'd;
QUIT; when I execute the code, is get this feedback: 611 proc sql;
612 create table Monthly as
613 SELECT c.*, d.*
614 FROM careods.Care_deaths c Full Join Mthdthrp.dthr717 d
615 on input(c.care_id, $8.) = d.care_id and c.lastup_DT = d.DOS
616 order datepart(c.lastup_DT) Between '17JUL2018'd and '17JUL2019'd;
NOTE: The query as specified involves ordering by an item that doesn't appear in its SELECT
clause.
WARNING: Variable CARE_ID already exists on file WORK.MONTHLY.
WARNING: Variable Autopsy already exists on file WORK.MONTHLY.
NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return
a missing value.
NOTE: Table WORK.MONTHLY created, with 17765 rows and 56 columns.
617 QUIT;
NOTE: PROCEDURE SQL used (Total process time):
real time 1.30 seconds
cpu time 0.20 seconds
'invalid (or missing) argument to the datepart function have caused the function to return a missing value' Please help! Thanks!
... View more