3

I am using QGIS 3.10.3 and noticed some question marks in one column of the attribute table. These marks are just before the numbers and represent the currency symbol.

I want to get rid of them. I tried in the open Field Calculator this code: substr("fieldname", length("fieldname")-1). It deleted the question marks and the first numbers. How can I just delete the question mark?

2 Answers 2

7

Use this expression with the replace() function:

replace("fieldname", '?', '')
0
0

You can use a substring, based on regular expressions with regexp_substr() to output all charcters of the input except ? with this expression:

regexp_substr ("input",'([^\\?]+)')

enter image description here

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.