Date: Thu, 11 Jun 2009 09:09:26 +0200
Reply-To: Anders Mørup Jensen <amo@SSI.DK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Anders Mørup Jensen <amo@SSI.DK>
Organization: TDC Totalloesninger
Subject: Re: what function should I use to contain some specific characters
In all your examples in dataset b you want to extract the part of type that
follows immediately after the string 'dr '.
Assuming that this is the general rule the statement
should give you the desired value.
"Lily" <email@example.com> skrev i en meddelelse
> Hey guys,
> I have two different datasets and wan to merge these two datasets.
> However, the key variable is a little different.
> For data set a, the variable "type" is like:
> CE 7-Passenger
> 7-Pass Ltd
> However, the variable 'type' in dataset b is like:
> FWD 4dr Limited
> 5dr 7-Pass Van LE Ltd FWD
> FWD 4dr L4 Base
> 5dr 7-Pass Van CE FWD
> 5dr 7-Pass Van LE FWD
> How can I make the variable 'type' in dataset b only keeps the
> characters which appears in b.type and get the following result:
> 7-Pass LE Ltd
> 7-Pass CE
> 7-Pass LE
> Any help is appreciated. Thank you so much.