Date: Fri, 24 Oct 2008 14:30:26 -0400
Reply-To: Jack Clark <jclark@HILLTOP.UMBC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Clark <jclark@HILLTOP.UMBC.EDU>
Subject: Re: COMPRESS function modifier not working as expected in PROC SQL
In-Reply-To: <ce1fb7450810241126x14cd017fw1cafd555361e613a@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"
_null_,
I don't think I could use your suggestion because the second parameter
in the function is a space. I don't want to compress spaces from the
string - only the numerals. The response Dave provided worked.
Jack
Jack Clark
Senior Research Analyst
phone: 410-455-6256
fax: 410-455-6850
jclark@hilltop.umbc.edu
University of Maryland, Baltimore County
Sondheim Hall, 3rd Floor
1000 Hilltop Circle
Baltimore, MD 21250
Confidentiality Notice: This e-mail may contain information that is legally privileged and that is intended only for the use of the addressee(s) named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying of this e-mail, distribution, or action taken in reliance on the contents of this e-mail and/or documents attributed to this e-mail is strictly prohibited. If you have received this information in error, please notify the sender immediately by phone and delete this entire e-mail. Thank you.-----Original Message-----
From: ./ ADD NAME=Data _null_, [mailto:iebupdte@gmail.com]
Sent: Friday, October 24, 2008 2:27 PM
To: Jack Clark
Cc: SAS-L@listserv.uga.edu
Subject: Re: COMPRESS function modifier not working as expected in PROC
SQL
On 10/24/08, Jack Clark <jclark@hilltop.umbc.edu> wrote:
> 755 proc sql;
>
> 756 select compress(x,,"d") as y
> -
> 22
> ERROR 22-322: Syntax error, expecting one of the following: a name, a
> quoted string,
Just give it what it wants.
proc sql;
select compress(x,' ',"d") as y
from test
;
quit;
It is a bit inconsistent. But you can use the same syntax in data step.
|