4

I have a column called "Kiinteistötunnus". The values ​​are in the form 73479400010025.

Values in the whole column ​​should be changed to form 734-794-0001-0025. The data type is Integer64. There are about 40000 individual values in that column, but the pattern is always the same: ###-###-####-####.

2
  • The data type is Integer64. There are about 40000 individual values in that column, but the pattern is always the same. ###-###-####-#### Commented May 20, 2022 at 10:09
  • 1
    Thanks Taras and MrXsquared. Solved this issue with your help! Commented May 20, 2022 at 11:45

1 Answer 1

5

Try this expression:

substr("Kiinteistötunnus",0,3)
||'-'||
substr("Kiinteistötunnus",4,3)
||'-'||
substr("Kiinteistötunnus",7,4)
||'-'||
substr("Kiinteistötunnus",11,4)

Make sure the new field is of type string

0

Your Answer

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.