3

I want to delete only certain information of certain cells of the attributes table in QGIS and not the complete rows or columns that contain that word. For example, I want to eliminate all the words "glacier" of the field type and the words "O'Higgins" of the field Name but conserve the rest of the row and column information and also in those cells I want to display "Null". How can I do that, is there any expression?

enter image description here

8
  • What software are you able to use?
    – John
    Commented Dec 27, 2023 at 13:30
  • 2
    What have you tried by so far ?
    – Taras
    Commented Dec 27, 2023 at 13:53
  • 2
    It will help you research this if you realize that you don't want to 'delete' but to 'update'. DELETE is a row-wise removal (only). Searching on 'update' and 'replace' will help.
    – Vince
    Commented Dec 27, 2023 at 13:57
  • 1
    There's a difference between a Null value and a null string (''), but this is the sort of thing you need to document in the Question (via an Edit, not as a comment). "It doesn't work" is not a sufficient problem statement -- you need to tell us what it does instead.
    – Vince
    Commented Dec 27, 2023 at 14:33
  • 1
    ...and in QGIS the null value is represented by NULL in upper case.
    – Spacedman
    Commented Dec 27, 2023 at 15:05

1 Answer 1

5

Use the field calculator, tell it to update the Type field, and use the expression:

if(Type='Glacier',NULL,Type)

apply that, and repeat for your other use case.

2
  • Thank you @Spacedman. I tried that expression and it works!!!
    – DorExplor
    Commented Dec 27, 2023 at 15:16
  • 3
    If the answer solved your problem, you should accept it (hit the checkmark next to it). Additionally, you can also upvotes it.
    – Babel
    Commented Dec 27, 2023 at 15:46

Your Answer

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

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