<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">3.6, but will check when I have time
later tonight and see if other versions show the same issue. And
will create a sample project with bug report.</div>
<div class="moz-cite-prefix">Thanks!</div>
<div class="moz-cite-prefix">Janneke<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 19/09/2019 18:04, Alexandre Neto
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+H0G_H=ncSpyngfWt8GAt7RN740p27sCUPu14kfxudiYiGRvA@mail.gmail.com">
<div dir="ltr">
<div>It sounds like a bug...</div>
<div>Can you provide a data sample and project. Also, what QGIS
version are you using?</div>
<div><br>
</div>
<div>Alexandre Neto<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Sep 19, 2019 at 3:57
PM Janneke van Dijk <<a
href="mailto:janneke.qgis@gmail.com" moz-do-not-send="true">janneke.qgis@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote">
<div>
<div>Hi Alexandre,</div>
<div>Also thanks for the quick response!<br>
</div>
<div><br>
</div>
What I can do with the DB manager is:<br>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote"> <br>
select location_point.geom, asset_point.assetid,
location_point.fid <br>
from asset_point cross join location_point on
asset_point.locationid = <br>
location_point.fid<br>
<br>
</blockquote>
<div><br>
</div>
<div>This should work, but why the CROSS JOIN? a
simple join should be enough.<br>
</div>
</div>
</div>
</blockquote>
I first had a simple join, then saw an example of a cross
join and tried that in the hope that that would make a
difference.<br>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote">this query yields 170
records, corresponding with the number of records <br>
in the assets table. When I load as a new layer, the
result is a table <br>
with 170 records, but 100 filtered (the total number
of locations). I <br>
chose assetid to be the unique id (which it is).<br>
<br>
Is that expected behaviour? How else can I display
all the records in <br>
the assets table (instead of only the 100 that are
filtered now)? I know <br>
I can do it in Postgres but for my purpose now I
don't want to go there.<br>
<br>
</blockquote>
<div><br>
</div>
<div>An alternative is to create a relation between
the two tables, the assets will show in the location
feature form. You can even add more assets to a
certain location.</div>
</div>
</div>
</blockquote>
I have a relationship, and the assets will show up in the
form of the location when you click on the location
(including locations with several). However, it doesn't
allow me to label the location with information from the
assets, or create symbology based on asset information.<br>
<p>What puzzles me is that the query results in 170 records,
I would have expected the geometry to be joined to each of
the 170 attribute records and then be displayed - so where
does the filter with a 100 suddenly come from? (Is this a
bug?)<br>
</p>
<p>As a work around I think I could get xy coordinates of
the location, then join them to the assets, export to csv
and import again as a delimited text layer for display
purposes. <br>
</p>
<p>I was hoping someone could either explain why this result
makes sense, or that I just made a mistake somewhere...any
more thoughts?<br>
</p>
<p>Thanks for sharing your thoughts!</p>
<p>Janneke<br>
</p>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div><br>
</div>
<div>Alexandre Neto<br>
</div>
<div> </div>
<br>
</div>
</div>
</blockquote>
<p><br>
</p>
</div>
</blockquote>
</div>
</blockquote>
<p><br>
</p>
</body>
</html>