4 Replies Latest reply: Jan 21, 2017 9:26 AM by Vineeth Pujari RSS

    Join all dates to table

    Андрей Шепель

      Colleagues, good day!

       

      I have one simple table (Main) with such fields:

       

           

      IDProductFlagDateSales
      1A101.12.201643
      1A103.12.201654
      1A104.12.20163
      1B105.12.20164
      1B106.12.20165
      2A101.12.201643
      2A103.12.201654
      2A104.12.20163
      2B105.12.20164
      2B106.12.20165

       

       

      Also i have directory with calendar, which contain Date field:

       

      Date
      01.12.2016
      02.12.2016
      03.12.2016
      04.12.2016
      05.12.2016
      06.12.2016
      07.12.2016

       

      I need to join all dates from directory to every ID, Product, and Flag, in result my result table must have such view:

       

           

      IDProductFlagDateSales
      1A101.12.201643
      1A102.12.2016-
      1A103.12.201654
      1A104.12.20163
      1A105.12.2016-
      1A106.12.2016-
      1A107.12.2016-
      1B101.12.2016-
      1B102.12.2016-
      1B103.12.2016-
      1B104.12.2016-
      1B105.12.20164
      1B106.12.20165
      1B107.12.2016-
      2A101.12.201643
      2A102.12.2016-
      2A103.12.201654
      2A104.12.20163
      2A105.12.2016-
      2A106.12.2016-
      2A107.12.2016-
      2B101.12.2016-
      2B102.12.2016-
      2B103.12.2016-
      2B104.12.2016-
      2B105.12.20164
      2B106.12.20165

       

       

      In attachment test files.

      many thanks for help!