Date: Fri, 4 Jul 2008 15:42:04 +0000
Reply-To: iw1junk@COMCAST.NET
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ian Whitlock <iw1junk@COMCAST.NET>
Subject: Re: Compress function in a proc sql
Ya,
Don't forget the simpler
compress(cats("[",min(score),";",max(score),"]"))
works in SQL since CATS does conversion quietly.
Ian Whitlock
-----------------
Date: Thu, 3 Jul 2008 11:24:37 -0400
Reply-To: Ya Huang <ya.huang@AMYLIN.COM>
Sender: "SAS(r) Discussion"
From: Ya Huang <ya.huang@AMYLIN.COM>
Subject: Re: Compress function in a proc sql
Comments: To: liege_come@YAHOO.FR
min() and max() function return numeric result, you need put() funtion to convert it to character before using '||'. SQL doesn't not do automatic data type conversion.
compress("["||put(min(score),best.)||";"||put(max(score),best.)||"]")
<SNIP>
|