<div dir="auto"><div>there can be issues with views, especially if the resulting field list is long.  Where there is limited screen space, it seems more natural to follow a join field.</div><div><br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><p><b>Mike Bundock</b>  <span style="color:red">|</span>  CEO </p>

<p>Augview <span style="color:red">|</span>  P O Box 125046, St Heliers,
Auckland 1740, New Zealand</p>

<p><span style="color:red">p:</span> +64 9 575 5298 <span style="color:red">| m:</span> +64 27 575 5298 <span style="color:red">| e:</span> <a href="mailto:mike.bundock@augview.net" target="_blank">mailto:mike.bundock@augview.net</a><span style="color:red">| w:</span> <a href="http://www.augview.net" target="_blank">www.augview.net</a></p><p>     <img width="200" height="62" src="https://ci3.googleusercontent.com/mail-sig/AIorK4x5d_90OgwUYmenuguX2CFhSi5CeVeitjISDtMLWcDPLGodP_QlECS8GtwLQgP5nd83PwyQbZckDGjcRJUnDvxdBFbk-bi2TsKi0sZA3SF_zhA"><img src="https://ci3.googleusercontent.com/mail-sig/AIorK4wcYhAdX-s6aI1ah8dINgZldvChJds1dV5XHMUQAHjQgXv2LxQKi1AI6sMpz2GNrZH-FcI-WoPEA3X9z-7P4CY59hGQ2zYXgEVJ__bFjMdNKVA">     <img src="https://ci3.googleusercontent.com/mail-sig/AIorK4w0YgCHZzFHtxsJ-flsNBzNbZ_XUqaKEh70Dgi40StNJsT_aOvpy0Z0xBN8MG1sJPEkoDkMMK2tGEj2PLxnJfz_mUYTUyxeBibTmPnnl7wIrGc"></p><p><span style="color:black">Winner of Innovation &
Commercialisation and Supreme Awards at 2014 NZ Spatial Excellence Awards</span></p><p>

</p><p><span style="color:black">Winner of Innovation & Commercialisation Award at 2014
Asia Pacific Spatial Excellence Awards</span></p></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, 18 Oct 2025, 8:19 am John Stevenson - BGS, <<a href="mailto:jostev@bgs.ac.uk">jostev@bgs.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="m_-2738335934154284621WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">We have also had success with views.  There are a few queries to run to register them correctly.  You can do this via the QGIS Database manager.  DB
 Browser for SQLite is also good.  Note that the view must include an integer ID to render correctly in some settings.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">CREATE VIEW IF NOT EXISTS "view_locality_geology" AS<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">  SELECT<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">    loc.fid as fid,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">    <a href="http://loc.name" target="_blank" rel="noreferrer">loc.name</a> as name,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">    loc.rock_type,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">    geo.minerals as colour,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">    geo.age as age,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">    loc.geometry as geometry<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">  FROM locality as loc<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">    LEFT JOIN geological_units geo on geo.rock_type= rock_type;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">INSERT INTO gpkg_contents<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">VALUES('view_locality_geology,'features','view_locality_geology','View with geology information at locality positions','2023-09-15T13:21:52.679Z',NULL,NULL,NULL,NULL,4326);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">INSERT INTO gpkg_geometry_columns<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">VALUES('view_locality_geometry','geometry','POINT',4326,1,0);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> QGIS-User <<a href="mailto:qgis-user-bounces@lists.osgeo.org" target="_blank" rel="noreferrer">qgis-user-bounces@lists.osgeo.org</a>>
<b>On Behalf Of </b>Mike Bundock via QGIS-User<br>
<b>Sent:</b> 17 October 2025 20:28<br>
<b>To:</b> Simon Dietmann <<a href="mailto:dietmann@pgnu.de" target="_blank" rel="noreferrer">dietmann@pgnu.de</a>><br>
<b>Cc:</b> qgis-user <<a href="mailto:qgis-user@lists.osgeo.org" target="_blank" rel="noreferrer">qgis-user@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [Qgis-user] save a join between attribute and table in gpkg?<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">hi<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">we had a similar issue in that we could not find a way of saving join information.  The technique we ended up using was to extend the qml syntax to support join field definitions, and use a small function to re-establish joins correctly.
 This is really useful if the same sets of tables are used in multiple projects.  Its simply a matter of loading the qml files using the layer -> properties -> load style function.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">We also use it as an easy method to define the join fields within other applications such as Augview.   It means that UI behaviour within multiple applications is consistent and only needs defining once.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">hope that is helpful. If you want to use the same syntax, let me know & i will send some documentation.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">regards<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p><b>Mike Bundock</b>  <span style="color:red">|</span>  CEO <u></u><u></u></p>
<p>Augview <span style="color:red">|</span>  P O Box 125046, St Heliers, Auckland 1740, New Zealand<u></u><u></u></p>
<p><span style="color:red">p:</span> +64 9 575 5298 <span style="color:red">| m:</span> +64 27 575 5298
<span style="color:red">| e:</span> <a href="mailto:mike.bundock@augview.net" target="_blank" rel="noreferrer">
mailto:mike.bundock@augview.net</a><span style="color:red">| w:</span> <a href="http://www.augview.net" target="_blank" rel="noreferrer">
www.augview.net</a><u></u><u></u></p>
<p>     <span style="border:solid windowtext 1.0pt;padding:0cm"><img border="0" width="200" height="62" style="width:2.0833in;height:.6416in" id="m_-2738335934154284621Picture_x0020_1" src="cid:~WRD0000.jpg" alt="Image removed by sender."><img border="0" width="100" height="100" style="width:1.0416in;height:1.0416in" id="m_-2738335934154284621Picture_x0020_2" src="cid:~WRD0000.jpg" alt="Image removed by sender."></span> 
    <span style="border:solid windowtext 1.0pt;padding:0cm"><img border="0" width="100" height="100" style="width:1.0416in;height:1.0416in" id="m_-2738335934154284621Picture_x0020_3" src="cid:~WRD0000.jpg" alt="Image removed by sender."></span><u></u><u></u></p>
<p><span style="color:black">Winner of Innovation & Commercialisation and Supreme Awards at 2014 NZ Spatial Excellence Awards</span><u></u><u></u></p>
<p><span style="color:black">Winner of Innovation & Commercialisation Award at 2014 Asia Pacific Spatial Excellence Awards</span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Fri, 17 Oct 2025, 11:13<span style="font-family:"Arial",sans-serif"> </span>pm Simon Dietmann via QGIS-User, <<a href="mailto:qgis-user@lists.osgeo.org" target="_blank" rel="noreferrer">qgis-user@lists.osgeo.org</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span lang="DE">Dear list,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="DE"> <u></u><u></u></span></p>
<p class="MsoNormal">I am trying to export some feature classes inside a common gpkg that have attribute joins to a table that’s also stored in the same gpkg.  Afaics there is no possibility to store
 the information about the table join also inside the gpkg, is that correct?<span lang="DE"><u></u><u></u></span></p>
<p class="MsoNormal"> <span lang="DE"><u></u><u></u></span></p>
<p class="MsoNormal">Is there a way to store (and share) the joins except sharing a .qgz file?<span lang="DE"><u></u><u></u></span></p>
<p class="MsoNormal"> <span lang="DE"><u></u><u></u></span></p>
<p class="MsoNormal">Thanks for your advice,<span lang="DE"><u></u><u></u></span></p>
<p class="MsoNormal"> <span lang="DE"><u></u><u></u></span></p>
<p class="MsoNormal">Regards<span lang="DE"><u></u><u></u></span></p>
<p class="MsoNormal"> <span lang="DE"><u></u><u></u></span></p>
<p class="MsoNormal">Simon<span lang="DE"><u></u><u></u></span></p>
<p class="MsoNormal"> <span lang="DE"><u></u><u></u></span></p>
<p class="MsoNormal"> <span lang="DE"><u></u><u></u></span></p>
</div>
</div>
<p><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">i.A. Simon Dietmann<br>
Projektleiter | Geograph</span><u></u><u></u></p>
<p><img border="0" width="204" height="89" style="width:2.125in;height:.925in" id="m_-2738335934154284621Picture_x0020_4" src="cid:image001.png@01DC3FAB.C25EC320"><u></u><u></u></p>
<p><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:gray">PGNU Planungsgesellschaft Natur & Umwelt mbH<br>
Amtsgericht Frankfurt am Main, HRB 111938; <br>
Geschäftsführer: Dr. Benjamin Hill, Dorit Thurm, Sebastian Braun<br>
<a href="https://www.google.com/maps/search/Hamburger+Allee+45+%2B%2B%2B+60486+Frankfurt+am+Main?entry=gmail&source=g" target="_blank" rel="noreferrer">Hamburger Allee 45 +++ 60486 Frankfurt am Main</a><br>
Durchwahl: +49 69 952964-32 +++ Fax: +49 69 952964-99<br>
E-Mail: <a href="mailto:dietmann@pgnu.de" target="_blank" rel="noreferrer">dietmann@pgnu.de</a> +++ Web:
<a href="http://www.pgnu.de" title="http://www.pgnu.de" target="_blank" rel="noreferrer"><span style="color:gray">www.pgnu.de</span></a></span><span style="font-size:7.5pt;font-family:"Arial",sans-serif"><br>
</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif"><br>
<span style="color:#999999">> Diese E-Mail könnte vertrauliche und/oder rechtlich geschützte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten
 Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.<br>
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution
 of the material in this e-mail is strictly forbidden.</span></span><u></u><u></u></p>
<p class="MsoNormal">_______________________________________________<br>
QGIS-User mailing list<br>
<a href="mailto:QGIS-User@lists.osgeo.org" target="_blank" rel="noreferrer">QGIS-User@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noreferrer">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noreferrer">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><u></u><u></u></p>
</blockquote>
</div>
</div>
<br>
<br>
This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete
 this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before
 opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses.<br>
<br>
</div>

</blockquote></div>