Joe,
Interesting thought. SQL is a group processing language, the fact that
SAS's implementation allows it to use SAS functions is well imo a nicety.
The question I suppose is how far should they go in doing this. The Group
By (and I may be wrong here) was intended to be used with statistical
functions as a way to tell SQL what groups to do the stats over. I am not
aware of character function that can utilize the Group By functionality.
That being said it would be interesting to see if SAS would implement the
ability of character functions to do this. I would think that it would be
a nice addition of Proc SQL.
Toby Dunn
On Fri, 27 Nov 2009 09:36:23 -0600, Joe Matise <snoopy369@GMAIL.COM> wrote:
>You've already had a few solutions... i'll just add my gripe, which is
that
>if CATS/etc. functions were enabled to work with GROUP BY, this would be
>trivial...
>proc sql;
>select field1, catx('#',field2) from have group by field1;
>quit;
>
>But it doesn't :(
>
>-Joe
>
>On Fri, Nov 27, 2009 at 5:03 AM, naresh kmar <nareshkmar@yahoo.co.in>
wrote:
>
>> Hi,
>>
>> I have a dataset like this:
>>
>> field1 field2
>> a x
>> a y
>> a z
>> b L
>> b M
>> b N
>>
>> need an output like this:
>>
>> field1 field2
>> a x#y#z
>> b L#M#N
>>
>> Can someone please help with this?
>>
>> Thanks,
>> Naresh
>>
>>
>>
>> The INTERNET now has a personality. YOURS! See your Yahoo!
Homepage.
>> http://in.yahoo.com/
>>
|
|
0
|
|
|
|
Reply
|
tobydunn (6070)
|
11/27/2009 4:10:54 PM |
|