2

I have an attribute table with 5,000 records in QGIS. From this I have selected a subsection of 200 records whose attributes I need to modify. In the column called 'NAME' I would like to replace the current values with the same value for all 200 selected records.

Right now, the values in column NAME are different for each row (eg. Tom, Claire, Michael etc.) and I would like to know if there is a way to replace the 200 random names with the same name. I don't want to create an additional column, only to overwrite the current value stored in the 200 selected records.

So far I've tried various replace and regexp_replace expressions but I can't seem to get the correct syntax. Is there syntax that is able to select all the random names in the subset and replace it with a name I have chosen. Something like select, from selected NAME records and replace with XYZ?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Nov 24, 2015 at 15:07
2
  • 1
    Thanks Joseph! I had selected Update existing field, but used that with a replace function to no luck. This solved my problem! Many thanks! Commented Nov 24, 2015 at 15:16
  • 1
    Most welcome buddy, @radouxju posted his answer the same time I posted the comment (which described the same thing) so please accept his answer :) Commented Nov 24, 2015 at 15:18

1 Answer 1

3

if you already have a selection, then you can update your field using the field calculator : enter a new value (between ' ' for text) and check "update field".

enter image description here

answered Nov 24, 2015 at 15:12
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.