<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Merge in DO LOOPS?? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Merge-in-DO-LOOPS/m-p/28722#M6709</link>
    <description>Hello all,&lt;BR /&gt;
&lt;BR /&gt;
I'm a newbee at SAS, and I'm struggling with the following problem.&lt;BR /&gt;
&lt;BR /&gt;
I've created 1 table with dates, like&lt;BR /&gt;
&lt;BR /&gt;
2008-01-01&lt;BR /&gt;
2008-01-02&lt;BR /&gt;
2008-01-03&lt;BR /&gt;
etc.&lt;BR /&gt;
&lt;BR /&gt;
And I've got another table with customer id's, incident dates and incident id's, like&lt;BR /&gt;
&lt;BR /&gt;
Customer_id | Incident dates&lt;BR /&gt;
123         | 2008-01-02     &lt;BR /&gt;
123         | 2008-01-05   &lt;BR /&gt;
126         | 2008-01-05    &lt;BR /&gt;
128         | 2008-05-03    &lt;BR /&gt;
128         | 2008-05-28   &lt;BR /&gt;
128         | 2008-06-01    &lt;BR /&gt;
etc.&lt;BR /&gt;
&lt;BR /&gt;
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:&lt;BR /&gt;
&lt;BR /&gt;
For Customer ID 123 the list will be:&lt;BR /&gt;
&lt;BR /&gt;
2008-01-01 | &lt;BR /&gt;
2008-01-02 | 2008-01-02&lt;BR /&gt;
2008-01-03 | &lt;BR /&gt;
2008-01-04 |&lt;BR /&gt;
2008-01-05 | 2008-02-05 &lt;BR /&gt;
2008-01-06 |&lt;BR /&gt;
Then, the following customer ID and so on.&lt;BR /&gt;
&lt;BR /&gt;
I tried several hours to make this work (DO Loops, merges, etc), but I can't figure it out. Maybe anyone can help me? Really thanks in advance!!!</description>
    <pubDate>Tue, 01 Jul 2008 21:12:39 GMT</pubDate>
    <dc:creator>Wouter</dc:creator>
    <dc:date>2008-07-01T21:12:39Z</dc:date>
    <item>
      <title>Merge in DO LOOPS??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge-in-DO-LOOPS/m-p/28722#M6709</link>
      <description>Hello all,&lt;BR /&gt;
&lt;BR /&gt;
I'm a newbee at SAS, and I'm struggling with the following problem.&lt;BR /&gt;
&lt;BR /&gt;
I've created 1 table with dates, like&lt;BR /&gt;
&lt;BR /&gt;
2008-01-01&lt;BR /&gt;
2008-01-02&lt;BR /&gt;
2008-01-03&lt;BR /&gt;
etc.&lt;BR /&gt;
&lt;BR /&gt;
And I've got another table with customer id's, incident dates and incident id's, like&lt;BR /&gt;
&lt;BR /&gt;
Customer_id | Incident dates&lt;BR /&gt;
123         | 2008-01-02     &lt;BR /&gt;
123         | 2008-01-05   &lt;BR /&gt;
126         | 2008-01-05    &lt;BR /&gt;
128         | 2008-05-03    &lt;BR /&gt;
128         | 2008-05-28   &lt;BR /&gt;
128         | 2008-06-01    &lt;BR /&gt;
etc.&lt;BR /&gt;
&lt;BR /&gt;
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:&lt;BR /&gt;
&lt;BR /&gt;
For Customer ID 123 the list will be:&lt;BR /&gt;
&lt;BR /&gt;
2008-01-01 | &lt;BR /&gt;
2008-01-02 | 2008-01-02&lt;BR /&gt;
2008-01-03 | &lt;BR /&gt;
2008-01-04 |&lt;BR /&gt;
2008-01-05 | 2008-02-05 &lt;BR /&gt;
2008-01-06 |&lt;BR /&gt;
Then, the following customer ID and so on.&lt;BR /&gt;
&lt;BR /&gt;
I tried several hours to make this work (DO Loops, merges, etc), but I can't figure it out. Maybe anyone can help me? Really thanks in advance!!!</description>
      <pubDate>Tue, 01 Jul 2008 21:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge-in-DO-LOOPS/m-p/28722#M6709</guid>
      <dc:creator>Wouter</dc:creator>
      <dc:date>2008-07-01T21:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Merge in DO LOOPS??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge-in-DO-LOOPS/m-p/28723#M6710</link>
      <description>This looks more like a cross join and if that it is your logic, you could use proc sql.</description>
      <pubDate>Tue, 01 Jul 2008 23:25:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge-in-DO-LOOPS/m-p/28723#M6710</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-01T23:25:31Z</dc:date>
    </item>
  </channel>
</rss>

