The sql statement below will not run in SQLite:
select *
from A
left join (B inner join C on B.fkC = C.pk) on A.optionalfkB = B.pk
I get a sqlException “unknown column B.pk”
According to the documentation @ http://www.sqlite.org/lang_select.html this should work, and it will work in all other sql implementations. Am I doing something wrong?
It doesn’t work because the “outer” query doesn’t know what B is.
The
(B inner join C on B.fkC = C.pk)is weird without anyselect, but the specification does say that it is valid.