| Date: | Tue, 7 Nov 2000 20:04:40 -0500 |
| Reply-To: | Raynald Levesque <rlevesque@VIDEOTRON.CA> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | Raynald Levesque <rlevesque@VIDEOTRON.CA> |
| Subject: | Re: RTRIM? |
| Content-Type: | text/plain; charset="iso-8859-1" |
Hi Carol!
I believe this does it:
DATA LIST LIST /loc(A24).
BEGIN DATA
"Sacramento,CA"
"Minneapolis,MN"
",NY"
"Miami,"
"Sacramento, CA"
"Minneapolis, MN "
END DATA.
STRING state(A2).
COMPUTE state=LTRIM(SUBSTR(loc,RINDEX(loc,',')+1)).
EXECUTE.
HTH
Raynald Levesque rlevesque@videotron.ca
----- Original Message -----
From: "Parise, Carol A." <PariseC@SUTTERHEALTH.ORG>
Newsgroups: bit.listserv.spssx-l
To: <SPSSX-L@LISTSERV.UGA.EDU>
Sent: Tuesday, November 07, 2000 7:49 PM
Subject: RTRIM?
> Hi,
>
> I've got a file where i want to select only those cases where the state
> California. The field is set up CITY,STATE where the state is abbreviated
> using the 2 letter state abbreviation. For example:
>
> Sacramento,CA
> Minneapolis,MN
>
> I am thinking that somehow the RTRIM function would be the one to use but
i
> am not quite sure how to set up the syntax to handle this. Has anyone done
> this that would be willing share their wisdom?
>
> Thanks much
> Carol parise
> sacramento ca
|