|
On Mon, 6 Aug 2007 20:24:26 -0400, Scott Bass <sas_l_739@YAHOO.COM.AU> wrote:
>Hi,
>
>I would think I would have known how to do this by now, but alas I don't :-
>(
>
>Say I have the following data step:
>
>data one;
> length key 8 var $1;
> input key var;
> cards;
>1 A
>1 B
>1 C
>2 D
>2 E
>3 F
>;
>run;
>
>data two;
> set one;
> by key;
> length newvar $200;
> retain newvar;
> if first.key then newvar = "";
> newvar = catx(" ",newvar,var);
> if last.key then output;
>run;
>
>Is there a way to create this dataset using PROC SQL only?
None that I can visualize. The results are sensitive to the original order
of the rows, and SQL does not recognize order.
>I'd rather
>just use the data step, but the customer would prefer SQL if possible.
>
>Thanks,
>Scott
|