You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sorting does not occur for field names in Latin or in quotation marks! #2039
When creating a SQL query to Excel tables, if the column names are not in Latin, then you cannot sort using 'order by' if the column name is used without quotes (a syntax error occurs): let sql="select recordset * from xlsx('c:\\MyTable.xlsx') order by Поле";//syntax error
In the case of using quotes, this function simply does not work, since it is not the contents of the field that are compared, but its name, and they are always equal to each other for the compared rows when sorting inside AlaSQL: let sql="select recordset * from xlsx('c:\\MyTable.xlsx') order by 'Поле'";//Sorting does not occur!
I think I found a solution. It works if you pack the name of the required columns in square brackets: let sql="select recordset * from xlsx('c:\\MyTable.xlsx') order by [Поле]";//All ok!
I agree! You have a great library, but sometimes you have needs like the one I described, and it would be great to be able to make queries without escaping the column names!
You're getting the error "Path to alasql.js is not specified" because alasql.worker() needs an explicit path to the alasql.js file when running inside a web worker.
Solution:
Specify the path to alasql.js like this:
importalasqlfrom'alasql';alasql.worker('/path/to/alasql.js');// Make sure the correct path is set
import{useEffect}from'react';constworker=newWorker(newURL('./alasql-worker.js',import.meta.url));exportdefaultfunctionMyComponent(){useEffect(()=>{worker.onmessage=(event)=>{console.log('Query result:',event.data.result);};worker.postMessage({id: 1,sql: 'SELECT * FROM ?',params: [[{a: 1},{a: 2}]]});},[]);return<div>Check the console for results</div>;}
Key Fix:
Make sure /path/to/alasql.js is the correct location relative to your project.
If using Webpack/Vite, you might need to adjust the worker import.
Activity
StarfairStudio commentedon Jan 21, 2025
I think I found a solution. It works if you pack the name of the required columns in square brackets:
let sql="select recordset * from xlsx('c:\\MyTable.xlsx') order by [Поле]";//All ok!mathiasrw commentedon Jan 22, 2025
I am very happy that you found this solution. However, ill keep it open to allow anyone to provide a fix.
StarfairStudio commentedon Jan 23, 2025
I agree! You have a great library, but sometimes you have needs like the one I described, and it would be great to be able to make queries without escaping the column names!
mathiasrw commentedon Feb 28, 2025
AlaSQL bot answer
You're getting the error "Path to alasql.js is not specified" because
alasql.worker()needs an explicit path to thealasql.jsfile when running inside a web worker.Solution:
Specify the path to
alasql.jslike this:Example Usage in a Web Worker:
alasql-worker.js):Key Fix:
/path/to/alasql.jsis the correct location relative to your project.Let me know if it works.
Let quoted column names sort via ORDER BY to fix #2039 (#2275)
mathiasrw commentedon Dec 6, 2025
Fix released as part of v4.11.0