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 (October 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 2 Oct 2007 20:09:45 -0500
Reply-To:     barthr@uic.edu
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Barth Riley <barthr@uic.edu>
Organization: UIC
Subject:      Re: breaking up (a string variable) is hard to do
Comments: To: "Barnett, Adrian (DECS)" <Barnett.Adrian2@saugov.sa.gov.au>
In-Reply-To:  <9A37D712ED85C6438DDA21C4F044141203AE7AC5@sagemsg0024.sagemsmrd01.sa.gov.au>
Content-Type: text/plain; charset="us-ascii"

Try this:

Create a variable called index as follows:

Index = INDEX(oldvar,"-")

Then create newvar as follows:

Newvar = CONCAT(SUBSTR(oldvar,1,index-1),SUBSTR(oldvar,index+1,INDEX(SUBSTR(oldvar,in dex+1),"-")-1))


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