9 Replies Latest reply: Aug 1, 2018 5:10 PM by KUMAR PANCH RSS

    #2 How to create join for multiple resident Tables

    KUMAR PANCH

      Hi All,

      Am looking to create new table based on resident tables ( ResidentTab1,ResidentTab2,ResidentTab3), not sure if i need to use join or keep left join statement and grouping

       

      RTab1 is running calendar week ,

      RTab2 is required volume for products for specific week ( e.g.2017-WK 30, Product A,100)

      RTab3 is for week in which product is packed and week in which it is available (e.g. 2017-W26 Product A Pack.Vol 25 PassWK2017-W29)

       

      What i am looking to achieve is use RTab1 and join RTab2 ,RTab3 also use SUM ( Pack.Vol) when PassWK is equal to Calendar week, why SUM since packed volume will be split in lots for product thus sum product lots quantity for next calculation.

       

      Have attached example of table structure in attached text file,there may be  better way to achieve what am trying ..

       

      ResidentTab1
      CYear
      CYearQuarter
      CYearMonth
      CYearWeek

       

      ResidentTab2
      CYear
      Req.WK
      Product
      Req.Vol

       

      ResidentTab3
      Pack.WK
      Pack.Vol
      PassWK

       

      (Creat new table  based on join)
      CYear
      CYearQuarter
      CYearMonth
      CYearWeek
      Product
      Req.Vol
      Pack.Vol