If beginning year and ending year are known, how to fill in years in between?

Question:

Suppose two companies A and B are connected in some years. Say, right now the data structure is the following:

Company 1 Company 2
Starting Year Ending Year
A B
2000 2006
A C
1998 2003
C D
1995 1997

I want to find a way to generate:

Company 1 Company 2
Year
A B
2000
A B
2001
…………….
A B
2006
A C
1998
……………..
A C
2003
C D
1995
……………..
C D
1997

Answer:

 

This entry was posted in SAS. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *