<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> </div>
<div>
<div>Thanks for all the comments!</div>
<div>I added a letter to the begin of each name and double quoted the names.</div>
<div> </div>
<div>However, it didn't work with v3.20, but with v3.24 it works.</div>
<div> </div>
<div>Regards,</div>
<div>Roland</div>
<div> </div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Mittwoch, 16. März 2022 um 17:02 Uhr<br/>
<b>Von:</b> "chris hermansen" <clhermansen@gmail.com><br/>
<b>An:</b> "Roland Spielhofer" <rspiel@gmx.net><br/>
<b>Cc:</b> "qgis-user" <qgis-user@lists.osgeo.org><br/>
<b>Betreff:</b> Re: [Qgis-user] Troubles with Join of two layers</div>
<div name="quoted-content">
<div>
<div>Roland and list<br/>
<div class="gmail_quote">
<div class="gmail_attr">On Wed, Mar 16, 2022, 01:20 Roland Spielhofer via Qgis-user <<a href="mailto:qgis-user@lists.osgeo.org" onclick="parent.window.location.href='mailto:qgis-user@lists.osgeo.org'; return false;" target="_blank">qgis-user@lists.osgeo.org</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<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>
</div>
</div>
</blockquote>
</div>
</div>
<div> </div>
<div>Maybe try putting the 2019_Joined_Ebenheit in double quotes because it begins with a non letter?</div>
<div> </div>
<div>Chris</div>
</div>
</div>
</div>
</div>
</div></div></body></html>