0

I read a table, do some filtering and the results are in an object called "row".

    let row=[];
    vs.forEach((r,i)=>{
            if(dtv>=frv && dtv<=tov && id==r[0] && (r[12] == Suppliers[0] || r[12] == Suppliers[1] || r[12] == Suppliers[2]))   {
                   row.push(r);
                      }
    });

I am trying to write a query using ALASQL library in Google Apps Script.

    var alasql = AlaSQLGS.load();
    var res = alasql('SELECT A,B, SUM(C) FROM ? GROUP BY A,B',[row]);

I get the error "SyntaxError: Parse error" in the query line.

Any suggestions would be appreciated on how to resolve this.

user3447653
  • 3,968
  • 12
  • 58
  • 100
  • 1
    Perhaps the problem is AlaSQL is meant to use clientside. Google Apps Script runs on a server. [Reference](http://alasql.org/) – Cooper Mar 26 '21 at 20:51
  • Could you please include your row data values, and your expected result for us to visualize your goal and probably replicate your issue. – Ron M Mar 26 '21 at 20:55

0 Answers0