title: generate duplicate rows in Select statement in Oracle
body: <p>I have a select statement with more than 10 columns.I have to repeat the rows wherever the data is missing based on the date.
  The rows which are to be generated should have data from the preceding rows sorted by date ascending.
  The date range to be considered is based on grouping of id.</p>
  
  <p>The date is actually a range from 15th March to 16th April,but for sample I have taken only limited rows.</p>
  
  <p>For example the data is as shown below.</p>
  
  <pre><code>    ID  Date    Type    Code  Location
     ==== ======  ===     ====   ====
      1   15-Mar  TG       RET    X1
      1   17-Mar  GG       CAN    S2
      1   20-Mar  DTR      ISS    D2
      2   14-Apr  YT       RR     F2
      2   16-Apr  F        FC     F1
  </code></pre>
  
  <p><em>Excepted output:</em></p>
  
  <pre><code>    ID  Date    Type    Code  Location
      === ====    ====   ====  ======  
      1   15-Mar  TG      RET    X1
      *1  16-Mar  TG      RET    X1*
      1   17-Mar  GG      CAN    S2
      *1  18-Mar  GG      CAN    S2*
      *1  19-Mar  GG      CAN    S2*
      1   20-Mar  DTR     ISS    D2
      2   14-Apr  YT      RR     F2
      *2  15-Apr  YT      RR     F2*
      2   16-Apr  F       FC     F1
  </code></pre>