WIX SQL Package not working with JOIN

In the WIX SQL Package ‘@velo/wix-data-sql-backend’ there is an example in the README.md file using JOIN

sql(‘SELECT Teams.city, Teams.name, Players.team, Players.name FROM Teams LEFT JOIN Players ON Teams.name = Players.team’)

I could not get an example working even with a very simple collection structure.

In fact I could not get this to work without a JOIN as it fails when you reference a field using the syntax [ < collection1 > . < column > ]

Example - this does not work:
sql( ‘SELECT Teams.city FROM Teams’ );
This gives the error:
Syntax error near “SELECT”. Reason: column does not exist Teams.city

And yet this works:
sql( ‘SELECT city FROM Teams’ );

Is there anyone out there using this package ?

1 Like

I can not get it to work either.

I have the same problem.

It really looks like this is a bolt-on that was not tested properly. Wix would be so much more powerful if it had an ODBC interface to SQL Server - or any other external database. The Collections are really unsophisticated, joining them in queries has to be done in complex code.