SQLite says “no such column: rowid”
(1.1) By Asclépiade (asclepiade) on 2021-02-04 00:59:46 edited from 1.0 [source]
I want to add a JOIN into an existing request but I get an error as result and I dont understand why. Someone can tell me what I'm doing wrong? I send the following request: SELECT rowid, idSource, idFabric, codeItem, ,notes FROM TableSourcesItems INNER JOIN TableSources ON TableSourcesItems.idSource = TableSources.rowid WHERE rowid = <value from variable>; And I get the result: [SQLITE_ERROR] SQL error or missing database (no such column: rowid) I have no error if I remove the 'INNER JOIN ... ON ...' Part Thank you for your help.
(2) By Keith Medcalf (kmedcalf) on 2021-02-04 00:11:12 in reply to 1.0 [link] [source]
Which rowid?
(3) By Asclépiade (asclepiade) on 2021-02-04 00:54:55 in reply to 2 [link] [source]
I think that sqlite talk about this one 'TableSources.rowid' because when I remove the JOIN part of the request everything work fine.
(4) By Keith Medcalf (kmedcalf) on 2021-02-04 02:02:42 in reply to 3 [link] [source]
That does not make any sense whatsoever.
Hint: Try qualifying all the "rowid" names and see what transpires ...