Simon Berthiaume wrote:
For those of you that tends to write complex queries, I noted that
SQLite doesn't like when a table name follows a opening parenthesis in
the FROM clause.

The simplest fix for this would be to insert "SELECT * FROM" right after the "(" in the FROM list. So, if the original query was like this:

SELECT * FROM tab1 LEFT JOIN (tab2 LEFT JOIN tab3);

The query could be rewritten as follows:

SELECT * FROM tab1 LEFT JOIN (SELECT * FROM tab2 LEFT JOIN tab3);

The 2nd form would be correctly understood by SQLite.  It wouldn't be
very difficult to get the SQLite parser to do this automatically, I
expect.  Then the first form would work just like the second without
any need for human intervention.


-- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to