3 Replies Latest reply: Jul 18, 2012 7:00 AM by Wojciech Parzyszek RSS

    Help required.

    Siva Boggarapu

      Hello There,

       

      I ham trying to put  below expression in Load script

       

      aggr(sum(Filedname1),Filedname2) as Test1

      aggr(sum(Filedname1),Filedname2, Filedname='ABC') as Test2

       

      it is giving error.  How can i put this expression into script while loading?

       

      Thanks,

      Siva

        • Re: Help required.

          Hi,

           

          Can you explain a bit more what you're trying to achieve?  Looking at the description of the aggr() function are you sure it is meant for use in the load statement?  It looks like it is more appropriate as a chart function.  An example qvw will be really helpful.  Also, have you included "group by" in the load statement?  If you're using SUM() it will normally be required.

           

          Cheers,

          Emma

          • Re: Help required.

            aggr() function is not applicable at script level use

             

            Load Filedname2,sum(Filedname1) as Test1 Resident Table1 Group by Filedname2;

             

            Kiran.

            • Re: Help required.

              -------------1--------------

              load

              FieldName2

              sum(Fieldname1) as Test1

              from... group by FieldName2

               

              -----------------2------------

               

              load

              FieldName2

              sum(Fieldname1) as Test1

              from... where FieldName='ABC' group by FieldName2