Hello all,
I'm a newbee at SAS, and I'm struggling with the following problem.
I've created 1 table with dates, like
2008-01-01
2008-01-02
2008-01-03
etc.
And I've got another table with customer id's, incident dates and incident id's, like
Customer_id | Incident dates
123 | 2008-01-02
123 | 2008-01-05
126 | 2008-01-05
128 | 2008-05-03
128 | 2008-05-28
128 | 2008-06-01
etc.
What I want to create is a list per Customer ID, which overlays the first dates table (sort of outer join, but per customer), so the dates table stays intact (I try the merge statement, but this don't leaves the dates table intact). So this will create a huge table, because all the customers have there own list (I like to have all lists below each other. Like:
For Customer ID 123 the list will be:
2008-01-01 |
2008-01-02 | 2008-01-02
2008-01-03 |
2008-01-04 |
2008-01-05 | 2008-02-05
2008-01-06 |
Then, the following customer ID and so on.
I tried several hours to make this work (DO Loops, merges, etc), but I can't figur it out. Maybe anyone can help me? Really thanks in advance!!!
I'm a newbee at SAS, and I'm struggling with the following problem.
I've created 1 table with dates, like
2008-01-01
2008-01-02
2008-01-03
etc.
And I've got another table with customer id's, incident dates and incident id's, like
Customer_id | Incident dates
123 | 2008-01-02
123 | 2008-01-05
126 | 2008-01-05
128 | 2008-05-03
128 | 2008-05-28
128 | 2008-06-01
etc.
What I want to create is a list per Customer ID, which overlays the first dates table (sort of outer join, but per customer), so the dates table stays intact (I try the merge statement, but this don't leaves the dates table intact). So this will create a huge table, because all the customers have there own list (I like to have all lists below each other. Like:
For Customer ID 123 the list will be:
2008-01-01 |
2008-01-02 | 2008-01-02
2008-01-03 |
2008-01-04 |
2008-01-05 | 2008-02-05
2008-01-06 |
Then, the following customer ID and so on.
I tried several hours to make this work (DO Loops, merges, etc), but I can't figur it out. Maybe anyone can help me? Really thanks in advance!!!