2 Replies Latest reply: Mar 19, 2015 8:25 PM by surfman joe RSS

    multi tables load

    surfman joe

      I have attached 3 tables,

      Item Sales contains Item, store and sales per week.

      Item Budget contains Item, area and weekly budget,

      Store Info contains store and its area.

       

      Also, column week in first 2 tables has totally different value.

       

      What script should I use to load them correctly? Please share the script instead of qvw as I could not open 3rd party's qvw file. thanks.

        • Re: multi tables load
          Massimo Grossi

          Correctly depends on your requirements


          Sales:

          LOAD [Item #],

              [Store #],

              Sales,

              replace(Week, '#', '') as Week,

            'Sales'as Table

          FROM

          [Item Sales.xls]

          (biff, embedded labels, table is Sheet1$);

           

          left join (Sales)

          LOAD [Store #],

              Area

          FROM

          [Store Info.xls]

          (biff, embedded labels, table is Sheet1$);

           

          Concatenate (Sales)

          LOAD [Item #],

              Area,

              Budget,

              replace(Week, 'Week', '') as Week,

              'Budget' as Table

          FROM

          [Item Budget.xls]

          (biff, embedded labels, table is Sheet1$);