[Qgis-user] Problems to create new columns through two tables
Frank Broniewski
hallo at frankbroniewski.com
Tue Feb 20 12:58:39 PST 2018
Hey Daniel,
did you have a look at virtual layers [1]? They allow you to reference as many layers and tables as you wish and perform some SQL on them to create a new layer. In addition, if you define a proper relation [2] between your layers you can use the aggregate_* [3] functions in the field calculator to get to your desired result.
HTH Frank
[1] https://docs.qgis.org/2.18/en/docs/user_manual/working_with_vector/virtual_layers.html
[2] https://docs.qgis.org/2.18/en/docs/user_manual/working_with_vector/attribute_table.html?highlight=relation#creating-one-or-many-to-many-relations
[3] https://docs.qgis.org/2.18/en/docs/user_manual/working_with_vector/expression.html?highlight=aggregates#aggregates-functions
Dipl. Geogr. Frank Broniewski
Waldhölzbacher Str. 51
66679 Losheim am See
06872 509 068 4
0176 611 26 9 2 6
www.frankbroniewski.com
Von: Qgis-user [mailto:qgis-user-bounces at lists.osgeo.org] Im Auftrag von Daniel Alejandro Montecinos Rubilar
Gesendet: Dienstag, 20. Februar 2018 18:27
An: qgis-user at lists.osgeo.org
Betreff: [Qgis-user] Problems to create new columns through two tables
Hello
I want to create a new column in QGIS from a cross-information of two tables. The first table are communes of my country and the second are some electrical faults plotted as points. Then I want to create a new column in table 1, by means of the following logic:
NewColumn = Sum (column_value2_ of_table2)
I have been using MapInfo for a long time and recently I occupy QGIS with the intention of changing and I was getting convinced until I could not perform this operation, which in MapInfo was very easy with SQL queries.
I already appreciate your comments
Sincerely,
________________________________
Daniel Montecinos Rubilar
Electrical Civil Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180220/39aa9fe2/attachment.html>
More information about the Qgis-user
mailing list