6 Replies Latest reply: Sep 28, 2016 7:45 AM by Silambarasan Manickam RSS

    Sum function in load script

    Monica Chhabra

      Hi All,

       

      I am trying to use a Sum function in load script where I want to sum the quantity by Product Code (Quantity and Product Code are two fields) and couple of other conditions as in where clause in syntax below.  I used Group by Product Code.  I get an error below:

      I really appreciate any help on this

       

      Thanks

      Monica

       

      The following error occurred:

      Invalid expression

      The error occurred here:

      Composite: NoConcatenate Load *, Sum(Quantity) AS All_Qty Resident OpportunityWon where IsPrimary__c = 1 AND [Close Date] > 42552 Group by [Product Code]

       

      Composite:

      NoConcatenate

      Load *,

      Sum(Quantity) AS All_Qty

      Resident OpportunityWon

      where IsPrimary__c = 1 AND [Close Date] > 42552

      Group by [Product Code];