Hi friends,
I have two tables salary and department . I need to bring that particular department in to the salary table. Please throw me some ideas
emp_no | salary | from_date | to_date |
10010 | 72488 | 24/11/1996 | 24/11/1997 |
10010 | 74347 | 24/11/1997 | 24/11/1998 |
10010 | 75405 | 24/11/1998 | 24/11/1999 |
10010 | 78194 | 24/11/1999 | 23/11/2000 |
10010 | 79580 | 23/11/2000 | 23/11/2001 |
10010 | 80324 | 23/11/2001 | 01/01/9999 |
emp_no | dept_no | from_date | to_date |
10010 | d004 | 24/11/1996 | 26/06/2000 |
10010 | d006 | 26/06/2000 | 01/01/9999 |
Please explain the logic you are using here. Please explain what the desired output is.
I want the output like this . But then if you observe the employee is with d004 department till 26th june 2000. I am really not having any clue how to do this
emp_no | salary | from_date | to_date | Department |
10010 | 72488 | 24/11/1996 | 24/11/1997 | d1004 |
10010 | 74347 | 24/11/1997 | 24/11/1998 | d1004 |
10010 | 75405 | 24/11/1998 | 24/11/1999 | d1004 |
10010 | 78194 | 24/11/1999 | 23/11/2000 | d1004 |
10010 | 79580 | 23/11/2000 | 23/11/2001 | d006 |
10010 | 80324 | 23/11/2001 | 01/01/9999 | d006 |
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.