Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to modify the end of a string variable

    Dear Statausers,

    I have a large dataset with many addresses (variable address, a string one) and I would like to add ", CHILE" and the end of each one.
    Address example: CALLE CESAR MANZANO 175.
    I have tried to use (it doesn't work, I'm new using this command):

    Code:
    replace address = subinstr(address, "`x'", ", CHILE",1)
    Thank you in advance,

    Daniel.
    Last edited by Daniel Perez Parra; 02 Nov 2022, 16:47.

  • #2
    Code:
    replace address = address + ", CHILE"

    Comment


    • #3
      Originally posted by Nick Cox View Post
      Code:
      replace address = address + ", CHILE"
      Much easier than I expected! Thank you, Nick.

      Comment

      Working...
      X