[Qgis-user] Edit attribute table rows
Lester Anderson
arctica1963 at gmail.com
Fri Apr 8 06:28:24 PDT 2016
Hi Andreas,
I am trying change a lot of values, if it was a few that is no problem.
The other option is to export the attribute table as a database and
edit in Excel etc and then join the table in QGIS
Cheers
Lester
On 8 April 2016 at 14:23, Neumann, Andreas <a.neumann at carto.net> wrote:
> Hi Lester,
>
> I thought you want to set the value to 623 where the value was NULL before?
> - so just write 623 in the left field after you selected the values.
>
> Alternatively, you can do without the previous selection and use the
> following expression.
>
> CASE WHEN depth IS NULL THEN 623 ELSE depth END
>
> Hope this helps,
>
> Andreas
>
>
>
> On 2016-04-08 15:13, Lester Anderson wrote:
>
> Hello Andreas,
>
> Selecting the rows where depth = NULL is fine. The field calculator
> does not update the depth with the depth where known values are
> present.
>
> Only update selected features is checked, update existing field
> checked, with output field set to depth:
> Expression: tried just "depth" and also "depth"="depth".
>
> Have I missed something here?
>
> Thanks
>
> On 8 April 2016 at 12:30, Neumann, Andreas <a.neumann at carto.net> wrote:
>
> Sure.
>
> It is a two-step thing:
>
> 1. Select all records where Depth IS NULL. Use the "Select Features using an
> expression" button (the Epsilon sign) for that and "depth IS NULL" as an
> expression
>
> 2. Use the field calculator and only update the selected records (the top
> checkbox in the field calculator).
>
> You can find details about the field calculator in the QGIS manual.
>
> Hope this helps,
>
> Andreas
>
> On 2016-04-08 13:18, Lester Anderson wrote:
>
> Hello,
>
> I have an attribute table of earthquake data (focal mechanism beach
> balls) and need to edit the depth attribute. Each ball is defined by
> two rows in the table, eg first ball
>
> Row_ID Strike Dip Rake Magnitude Quadrant Depth
> ----------------------------------------------------------
> 0 NULL NULL NULL NULL Tensional and Compressional NULL
> 1 233 38 -96 6.77 Compressional 623
> 2 NULL NULL NULL NULL Tensional and Compressional NULL
> 3 68 36 83 5.7 Compressional 39
> etc
>
> where rows 0,1 and 2,3 represent separate beach balls, so basically it
> is a row calculation
>
> What I need to do is replace the Depth NULL value with the depth 623
> etc for each entry. Is there an easy way of doing this?
>
> Thanks
>
> Lester
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
>
>
>
>
More information about the Qgis-user
mailing list