Application number | O_DATE | Number | APPSTATUSDATE | APPLICATION_NUMBER |
15857 | 04May2016 0:00:00 | 1585766128 | 23Apr2016 | 15857 |
32344 | 02Nov2015 0:00:00 | 3234439493 | 31Oct2015 | 32344 |
61275 | 07Jan2016 0:00:00 | 6127522542 | 30Dec2015 | 61275 |
61378 | 04Dec2015 0:00:00 | 6137848422 | 27Nov2015 | 61378 |
Hello ,
I am trying to using proc sql a left join to make the Application_num=Num where month(datepart( t1.O_DATE)= month(t2. APPSTATUSDATE) and year\(datepart( t1.O_DATE)= \(t2. APPSTATUSDATE)
But the rows in the excel above coule not match because they are not in the same month, how can I include them in my filter ?
Thank you.
I, for one, don't understand what you just said. Without expressing it in code criteria are you trying to incorporate to consider one record matching with another?
Art, CEO, AnalystFinder.com
If I understand you want to do something you have defined when the month and year match between your two variables O_date and AppStatusDate. But then you show values for those variables where the month and year do not match.
Can you provide and actual rule for how that match is supposed to take place?
Also, since you are apparently using TWO data sets then the structure of those sets is important. For instance which sets to the variables "Application number" (not a valid SAS name generally) and Number come from?
It would be best to post 1) all of the code not that pseudocode with illegal syntax, 2) examples of records from each data set. Do not paste pictures or Excel copy & paste. Data should be in form of a data step so that we can actually recreate useable data. Anything pasted from Excel requires us to guess about the actual variable type and name.
Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.