1

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?

  • 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! – User 3875425 Nov 24 '15 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 :) – Joseph Nov 24 '15 at 15:18
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.