Re: [sqlite] querying attached database
I don't think this is a bug, at least not in the context presented. "commodities.id" really is ambiguous here, and it can be disambiguated with "main" or "temp" or the name of the attached database, per the documentation. Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sqlite] querying attached database
From: "Bronislav Klučka" <[EMAIL PROTECTED]> > Hi, I've got two same databases (one is older then the second one) and I > wanted to attach them, so I've done: > > attach database './database/produkty.sdb' as commodities2; > select * from commodities left join commodities2.commodities on > commodities.id = commodities2.commodities.id > > the second query returned: "ambiguous column name: commodities.id" how can I > join them? > You need to alias one of the table names to make them unique. Try this: select * from commodities left join commodities2.commodities as commodities2 on commodities.id = commodities2.id; The operation of SQLite does not agree with the documentation (or expected behavior) so you should probably file a bug report. This is really just a workaround because the database names are not leading to unique table/column references. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sqlite] querying attached database
Try main.commodities.id = commodities2.commodities.id. See the first paragraph of www.sqlite.org/lang.html#attach. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]