proc format;
value $dest
'DFW'='Dallas/Forth Worth'
'LAX'='Los Angeles'
'ORD'="O'Haire"
'WAS'= 'DC-ALL Airports'
'CDG'= 'De Gaulle'
'CPH'= 'Copenhaugen'
'FRA'='Frankfurt'
'LHR'='London-Heathrow'
'YYZ'='Toronto'
;
run;
Proc SQL;
create table ex1 AS
select distinct s.state as Staff_State,s.empid,sup.state as SUP_Sate,p.jobcode, put(f.destination,$DEST.) AS dest,f.date
from mysas.supervisors AS Sup
full Join mysas.staffmaster AS s ON s.empid=sup.empid
full Join mysas.payrollmaster as P ON s.empid=p.empid
full join mysas.flightschedule as f ON s.empid=f.empid
where destination in('CPH') and date ='04MAR2004'
;
quit;
when I try to select destination and the date I am getting an error in the log: date is a numeric value with date9. format.
ERROR: Expression using equals (=) has components that are of different data types.
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 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.