As the title describes, I have the problem, that I'm getting an error message as soon as I try to use the AS clause in the sql statement of the angular module alasql.
The following error message will displayed:
Error: Parse error on line 1: ... shortcode AS Short code, fname AS fullname -----------------------^ Expecting 'EOF', 'WITH', 'COMMA', 'RPAR', 'PIVOT', 'UNPIVOT', 'REMOVE', 'ORDER', 'WHERE', 'UNION', 'INTERSECT', 'EXCEPT', 'FROM', 'INTO', 'GROUP', 'LIMIT', 'OFFSET', 'END', 'ELSE', 'SEMICOLON', 'GO', got 'LITERAL'
I'm not sure, what I'm doing wrong. In the wiki, they also used the AS clause without problems.
My angular code is very simple as shown below:
vm.btnExport = function () {
alasql('SELECT shortcode AS Short code, fname AS fullname INTO XLSX("test.xlsx",{headers:true}) FROM ?', [vm.list]);
};