LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2012)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 5 Jan 2012 15:16:00 -0800
Reply-To:     David Marso <david.marso@gmail.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         David Marso <david.marso@gmail.com>
Subject:      Re: Stripping Address Field Information
In-Reply-To:  <201201052226.q05KH1fl008294@waikiki.cc.uga.edu>
Content-Type: text/plain; charset=UTF-8

COMPUTE #=RINDEX(address,"#"). IF # > 0 Address=SUBSTR(address,1,#-1). COMPUTE #=RINDEX(address,"APT"). IF # > 0 Address=SUBSTR(address,1,#-1). LIST.

Doug Harden wrote > > Hi, I’m new to the list and I would appreciate some help. Here is my > problem. I have a file with over 2 million records. I want to modify the > address field. I need to strip out the apartment information and leave the > rest. It appears (though I haven’t checked every record – so I am > assuming > that is the case for every address) that the apartment information comes > at the end of the address. The address can be of varying length and the > apartment information can be presented in different ways, using different > spellings and spaces. Apartment, if included is always capitalized. > Sometimes a # is used instead. The address is one variable and it is a > string field. > > For example: > > 55 Oakwood Drive APT # 1400 > 2930 So 150 W #2 > 2359 Lowery Lane # 10 > 8910 Echolake Terrace APT 168 > 4105 10th Ave S APT3 > 62 N 27th ST APT A316 > > Is there any syntax that can strip out all the apartment information?, > APT, # and the associated numbers. > > Thanks. I can’t think of an easier way to do this. > > Doug > > ===================== > To manage your subscription to SPSSX-L, send a message to > LISTSERV@.UGA (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD >

-- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Stripping-Address-Field-Information-tp5124076p5124161.html Sent from the SPSSX Discussion mailing list archive at Nabble.com.

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


Back to: Top of message | Previous page | Main SPSSX-L page