Announcement

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

  • Removing digit numbers at the end

    Hi I would like to remove the latter digits code from some of the zip codes that I have in my dataset.

    city state zip year
    abilene tx 79605 2001
    abilene tx 79606-5854 2003
    abilene tx 79606-5854 2004
    abilene tx 79606-5854 2005

    What I need is that for each city I have 76606 not 79606-5854.
    I would really appreciate your help.

    Thanks a lot.
    Giulia

  • #2
    This should do it.
    Code:
    replace zip = substr(zip, 1, 5)

    Comment


    • #3
      Thanks a lot!

      Comment

      Working...
      X