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.
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.