Date: Thu, 3 Jul 2008 11:24:37 -0400
Reply-To: Ya Huang <ya.huang@AMYLIN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ya Huang <ya.huang@AMYLIN.COM>
Subject: Re: Compress function in a proc sql
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.)||"]")
On Thu, 3 Jul 2008 08:02:03 -0700, Pietro_L <liege_come@YAHOO.FR> wrote:
>Hello everybody,
>
>I would like to use the compress function in proc sql:
>
>proc sql;
>select count(*) into:nb_tot from bea_ss_rc_m1_7;
>create table toto as
> select decile,
> compress("["||min(score)||";"||max(score)||"]")
>length=10 as inter,
> count(*) as nb
>from tata
>group by decile;
>quit;
>
>But It doesn't work, I have this error message :
>ERROR: Concatenation (||) requires character operands.
>
>Anybody have advices.
>
>Thank you for your help
>
>PCL
|