Thanks for all the comments!
I added a letter to the begin of each name and double quoted the names.
However, it didn't work with v3.20, but with v3.24 it works.
Regards,
Roland
Gesendet: Mittwoch, 16. März 2022 um 17:02 Uhr
Von: "chris hermansen" <[email protected]>
An: "Roland Spielhofer" <[email protected]>
Cc: "qgis-user" <[email protected]>
Betreff: Re: [Qgis-user] Troubles with Join of two layers
Von: "chris hermansen" <[email protected]>
An: "Roland Spielhofer" <[email protected]>
Cc: "qgis-user" <[email protected]>
Betreff: Re: [Qgis-user] Troubles with Join of two layers
Roland and list
On Wed, Mar 16, 2022, 01:20 Roland Spielhofer via Qgis-user <[email protected]> wrote:
Hi,I am trying to join two layers using the DB Manager.One layer is a shape file, one is a pure attribute table without geometry.I have two fields that are identical in both layers, which should be used for the join.The SQL statement goes like this:SELECT *
FROM 210914_Joined_Ebenheit as a, 20210914_sqlbatch_20220315_161846_erfassungsdaten as b
WHERE
a.Filename = b.Filename AND
b.frameNr = b.Frame;What I get is the following error message:Query execution error on CREATE TEMP VIEW _tview AS SELECT * FROM 210914_Joined_Ebenheit as a, 20210914_sqlbatch_20220315_161846_erfassungsdaten as b WHERE a.Filename = b.Filename AND b.frameNr = b.Frame: 1 - unrecognized token: "210914_Joined_Ebenheit"I don't get the meaning of "unrecognized token" - What I am doing wrong?I have "Load as new layer" ticked on - I want a new layer.Any help appreciated!Regards,Roland
Maybe try putting the 2019_Joined_Ebenheit in double quotes because it begins with a non letter?
Chris
_______________________________________________ Qgis-user mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
