Unknown column error with implicit join ---------------------------------------
Key: CORE-5573 URL: http://tracker.firebirdsql.org/browse/CORE-5573 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 3.0.2 Environment: Windows 7 professional 64 bit Reporter: Roy Damman When testing Firebird 3.0.2 for migrating my projects from the Firebird 2.5.x series, I encountered a problem in version 3.0.2 in a complex query, which I have simplified to the following testcase: SELECT * FROM RELATIE a join SETTING s on (s.SETTINGID=1) LEFT JOIN ADRESRELATIE b ON (b.RELATIEID=a.RELATIEID and (b.ADRESTYPEID=s.ADRESTYPEIDMAIN)) LEFT JOIN TELEFOON d JOIN TELEFOONRELATIE e ON ((e.TELEFOONID=d.TELEFOONID) and (e.RELATIEID=a.RELATIEID) and (e.TELEFOONTYPEID=s.TELEFOONTYPEIDMAIN)) ON (d.ADRESID=b.ADRESID) this query gives the following message: SQL Message : -206 Column does not belong to referenced table Engine Code : 335544569 Engine Message : Dynamic SQL Error SQL error code = -206 Column unknown S.TELEFOONTYPEIDMAIN At line 6, column 23 An slightly altered version of the query, with the same fieldnames, runs normally. But this query is not suitable because it does give the desired resultset: SELECT * FROM RELATIE a join SETTING s on (s.SETTINGID=1) LEFT JOIN ADRESRELATIE b ON (b.RELATIEID=a.RELATIEID and (b.ADRESTYPEID=s.ADRESTYPEIDMAIN)) LEFT JOIN TELEFOON d ON (d.ADRESID=b.ADRESID) JOIN TELEFOONRELATIE e ON ((e.TELEFOONID=d.TELEFOONID) and (e.RELATIEID=a.RELATIEID) and (e.TELEFOONTYPEID=s.TELEFOONTYPEIDMAIN)) As said, I have created an testcase (database) which I will include with this issue. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel