LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: cc: Ya Huang <ya.huang@AMYLIN.COM>, liege_come@YAHOO.FR

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>


Back to: Top of message | Previous page | Main SAS-L page