title: Why many to many merge doesn't do cartesian product
body: <pre><code>data jul11.merge11;
  input month sales ;
  datalines ;
  1 3123
  1 1234
  2 7482
  2 8912
  3 1284
  
  ;
  run;
  
  
  data jul11.merge22;
  input month goal ;
  datalines;
  1 4444
  1 5555
  1 8989
  2 9099
  2 8888
  3 8989
  ;
  run;
  
  data jul11.merge1;
  merge jul11.merge11  jul11.merge22 ;
  by month;
  difference =goal - sales ;
  
  run;
  
  proc print data=jul11.merge1 noobs;
  run;
  </code></pre>
  
  <p>output:</p>
  
  <p>month sales goal difference</p>
  
  <pre><code>1   3123    4444    1321
  
  1   1234    5555    4321
  
  1   1234    8989    7755
  
  2   7482    9099    1617
  
  2   8912    8888    -24
  
  3   1284    8989    7705
  </code></pre>
  
  <p>Why it didn't match all observation in table 1 with in table 2 for common months ?</p>
  
  <p>pdv retains data of observation to seek if any more observation are left for that particular by group before it reinitialises it , in that case it should have done cartesian product .</p>
  
  <p>Gives perfect cartesian product for one to many merging but not for many to many .</p>