Hi
On Thu, Sep 19, 2019 at 3:10 PM Janneke van Dijk <janneke.q...@gmail.com> wrote: > > What I can do with the DB manager is: > > select location_point.geom, asset_point.assetid, location_point.fid > from asset_point cross join location_point on asset_point.locationid = > location_point.fid > > This should work, but why the CROSS JOIN? a simple join should be enough. > this query yields 170 records, corresponding with the number of records > in the assets table. When I load as a new layer, the result is a table > with 170 records, but 100 filtered (the total number of locations). I > chose assetid to be the unique id (which it is). > > Is that expected behaviour? How else can I display all the records in > the assets table (instead of only the 100 that are filtered now)? I know > I can do it in Postgres but for my purpose now I don't want to go there. > > 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. Check more info here: https://docs.qgis.org/3.4/en/docs/user_manual/working_with_vector/attribute_table.html?highlight=relation#introducing-1-n-relations Hope it helps. Alexandre Neto
_______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user