1 Reply Latest reply: Dec 20, 2013 8:15 AM by Michael Solomovich RSS

    Group By  and Count Question in a Load Statement

    David Young

      In a Load Statement will this work:

       

      A:

      Load

      AcctNum,

      WOID

      WOYear,

      WOMonth,

      Purpose,

      Priority,

      Craft,

      Cost,

      Hours

      From

      C:\QVD\Wotable.qvd;

       

      B:

      Load

      AcctNum,

      Count(WOID) as WOCount,

      WOYear,

      WOMonth,

      Craft,

      Purpose

      Resident Table 1

      Group By AcctNum, WOYear, WOMonth, Craft, Purpose;

       

      Drop Table A

       

      If that is fine I have two questions I need answered.  First is it good to have the string of fields in the Group By Statement?  Is it going to cause a Load issue?  Does the order of the Group By Statement matter?  Second is it good to have the Count(WOID) as WOCount as part of the Load statement or better to make it part of the expression on a chart?  I want the Load statement to perform as much of the heavy lifting of calculation as it can.  With Table A above I am reading in around 80 million rows of data so it is taking time for it to load in memory before I perform the actions in Table B.  If there are any suggestions that would be awesome.

       

      David