HI..
I have a limited knowledge of SAS. I am an AS400 developer who recently jumped to this platform when my company offered me the opportunity.
I am using EG (7.1) and trying to do a left join on 2 tables using a date field.
Table1 has a format of 20OCT2016:00:00:00
Table2 has a format of 20OCT2016
EG wants me to a manual join.. since there is no natural matching columns between the two tables.
I can connect the 2 date columns together and run it without errors, but my results show as NULL values. so the match didnt work
Can I extract(substring) the date only from table1 and do this?
Regards,
Chris
Most likely, what you are seeing are formatted versions of the data values (not the actual values).
If that's the case, the issue is that one table contains a date-time combination but the other is just the date. Try matching this way:
datepart(table1.fieldname) = table2.fieldname
It's the most likely way to resolve this, but sometimes it takes inspecting the data more closely.
Most likely, what you are seeing are formatted versions of the data values (not the actual values).
If that's the case, the issue is that one table contains a date-time combination but the other is just the date. Try matching this way:
datepart(table1.fieldname) = table2.fieldname
It's the most likely way to resolve this, but sometimes it takes inspecting the data more closely.
Thanks for the help, that worked great!
As I start doing more programming, I'm sure I'll be posting out here quite a bit with questions.
-Chris N.
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!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.