0

I've been trying to join two layers (one shapefile point-layer and one table without geometry) using one attribute column with mutual attributes. Normally this works perfectly.

However, only one fifth of the attributes are recognized and linked. This is really weird because I specifically checked that both the values are the same. I think the failed join might have something to do with the spaces in the field values (see screenshot).

Does anyone know a code to use in the field calculator to automatically remove all spaces in the attribute values? I want all values in the column 'DEFINITIEF' to be each one continuous string without spaces. I think the join/recognition of the same values will work better then. The type of column in the two layers is the same (Text, 100 characters).

screenshot column that I want to use to join the two layers

lambertj
3,1224 gold badges22 silver badges39 bronze badges
asked Aug 16, 2023 at 14:37

1 Answer 1

3

Use the replace QGIS function. So replace from the field "DEFINITIEF" the space characters (' ') with nothing (''): replace("DEFINITIEF", ' ','')

answered Aug 16, 2023 at 16:20
1
  • Works great! Thanks a lot! Commented Aug 17, 2023 at 7:18

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.