4 Replies Latest reply: Feb 7, 2014 3:06 PM by Marcos Vinicius Oliveira RSS

    Generating fields according to other table's values

    Marcos Vinicius Oliveira

      Hi there,

       

      I'm having some trouble trying to solve this issue:

       

      I have the vendor table with these fields:

       

      CODE_VENDORDATE_ADM
      0126/06/2013
      0210/09/2013
      0315/10/2013
      0420/10/2013
      0519/11/2013

       

      And the periods table with these fields:

       

      Period_StartPeriod_End
      25/06/201320/12/2013
      24/07/201323/01/2014
      24/08/201323/02/2014
      25/09/201324/03/2014
      24/10/201322/04/2014
      26/11/201325/05/2014
      21/12/201319/06/2014
      24/01/201423/07/2014

       

       

      What I need to to is create records for each vendor, starting from the first period available until the last registered.

      That would generate this for vendor 01, for example:    

      CODE_VENDORDATE_ADMPeriod_StartPeriod_End
      0126/06/201325/06/201320/12/2013
      0126/06/201321/12/201319/06/2014

       

       

      Each period is 6months large.

       

      Any ideas?