|
Thank you Arthur, I appreciate your help.
Mike
On Mon, 11 Jan 2010 16:09:26 -0500, Arthur Tabachneck
<art297@NETSCAPE.NET> wrote:
>Mike,
>
>Would something like the following suffice?:
>
>data have;
> informat sales_date date7.;
> format sales_date date7.;
> input PERSON_ID SALES_DATE UNIT_ID;
> cards;
> 77 01SEP06 2100
> 77 01SEP06 3557
> 77 05NOV06 1454
> 77 05NOV06 3765
> 77 13NOV06 1345
> 77 13NOV06 1456
>;
>
>proc transpose data=have out=want (drop=_:);
> var unit_id;
> by person_id sales_date;
>run;
>
>data want (drop=col:);
> set want;
> unit_ids=catx('-',of col:);
>run;
>
>HTH,
>Art
>-------
>On Mon, 11 Jan 2010 15:28:05 -0500, Mike Green <mike_green123@YAHOO.COM>
>wrote:
>
>>Hi,
>>
>>I would appreciate it if someone could help me with problem.
>>
>>I need to add a variable to the dataset that is a concatenation of the
>>UNIT_ID variable by SALES_DATE. Example - for 01SEP06 I need a new unique
>>id of 2100-3557.
>>
>> Obs PERSON_ID SALES_DATE UNIT_ID
>>
>> 137 77 01SEP06 2100
>> 138 77 01SEP06 3557
>> 139 77 05NOV06 1454
>> 140 77 05NOV06 3765
>> 141 77 13NOV06 1345
>> 142 77 13NOV06 1456
>>
>>Thanks,
>>
>>Mike
|