Date: Mon, 28 Feb 2011 22:27:52 -0500
Reply-To: Nat Wooding <nathani@VERIZON.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <nathani@VERIZON.NET>
Subject: Re: Sorting
In-Reply-To: <AANLkTinCcs0ek7Tn5AmGn6KqvTiOQxXwj=NRdwNrM11v@mail.gmail.com>
Content-Type: text/plain; charset="US-ASCII"
Pareen
We may be having a language problem here but your English is much better
than my best foreign language and I don't speak anything from the Indian
subcontinent (which is a guess, of course).
OK, "Unique month for each region" implies that nothing would be deleted
from the three observations that you show. However, the example that you
show deletes the second record for month 4 but the observations are not
sorted by region within month. The following will satisfy the example but
again, I am not certain that this is what you really want.
Nat
Data before;
input ID REGION $5. MONTH;
cards;
123 EMEA 1
123 JAPA 4
123 EMEA 4
;
Data After;
set before;
by id month;
if first.month;** note that we have not sorted the values of region within
each month;
run;
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Pareen
Patel
Sent: Monday, February 28, 2011 9:53 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Sorting
I would like to see Unique Month for each Region ...
123 EMEA 1
123 JAPA 4
123 EMEA 4
1st Row - EMEA appears in Month 1.
For next Row i would like to see JAPA in Month 4 and delete EMEA.
Thanks
On Mon, Feb 28, 2011 at 7:47 PM, Joe Matise <snoopy369@gmail.com> wrote:
> What do you actually want to do, then? Do you want the first Month for
> each Region?
>
> -Joe
>
>
> On Mon, Feb 28, 2011 at 7:53 PM, Parry <mditconsult@gmail.com> wrote:
>
>> ID REGION MONTH
>>
>> 123 EMEA 1
>> 123 JAPA 4
>> 123 EMEA 4
>>
>> any inputs on sorting to get Different month for Different region
>>
>> ID REGION MONTH
>>
>> 123 EMEA 1
>> 123 JAPA 4
>>
>> Regards
>>
>
>