[Qgis-user] Troubles with Join of two layers

Alessandro Pasotti apasotti at gmail.com
Wed Mar 16 06:10:12 PDT 2022


Just guessing, maybe it doesn't like a table name that starts with a digit.

On Wed, Mar 16, 2022 at 9:20 AM Roland Spielhofer via Qgis-user <
qgis-user at lists.osgeo.org> 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
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>


-- 
Alessandro Pasotti
QCooperative:  www.qcooperative.net
ItOpen:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220316/4cf4914f/attachment.html>


More information about the Qgis-user mailing list