title: SAS: Assign the missing values
body: <p>I have a strange database that looks like this:</p>
  
  <pre><code>Client Order_number Original_number New_number
  A      1            .               .
         .            1               2
  B      3            .               .
  C      4            .               .
         .            3               5
         .            5               6
         .            2               8
         .            4               9
  </code></pre>
  
  <p>Say for client A, he gets assigned an <code>Order_number</code>=1. Then for some reason, we had to change is <code>Order_number</code> for a <code>New_number</code> =2
  My objective is to populate the above matrix for the missing blanks in the column <code>Client</code> as follow:</p>
  
  <pre><code>Client Order_number Original_number New_number
  A      1            .               .
  A      .            1               2
  B      3            .               .
  C      4            .               .
  B      .            3               5
  B      .            5               6
  A      .            2               8
  C      .            4               9
  </code></pre>
  
  <p>I can't think of an efficient way to do so without using <code>MERGE</code>. </p>