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 |
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.