<div dir="ltr"><div><br></div><div>Just guessing, maybe it doesn't like a table name that starts with a digit.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 16, 2022 at 9:20 AM Roland Spielhofer via Qgis-user <<a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Verdana;font-size:12px"><div>Hi,</div>

<div>I am trying to join two layers using the DB Manager.</div>

<div>One layer is a shape file, one is a pure attribute table without geometry.</div>

<div>I have two fields that are identical in both layers, which should be used for the join.</div>

<div> </div>

<div>The SQL statement goes like this:</div>

<div> </div>

<div>SELECT *<br>
FROM 210914_Joined_Ebenheit as a, 20210914_sqlbatch_20220315_161846_erfassungsdaten as b<br>
 WHERE<br>
a.Filename = b.Filename AND<br>
b.frameNr = b.Frame;</div>

<div> </div>

<div>What I get is the following error message:</div>

<div> </div>

<div>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"</div>

<div> </div>

<div>I don't get the meaning of "unrecognized token" - What I am doing wrong?</div>

<div>I have "Load as new layer" ticked on - I want a new layer.</div>

<div> </div>

<div>Any help appreciated!</div>

<div> </div>

<div>Regards,</div>

<div>Roland</div></div></div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Alessandro Pasotti</div><div>QCooperative:  <a href="https://www.qcooperative.net" target="_blank">www.qcooperative.net</a><br></div>ItOpen:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div></div>