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
Content-Type: text/plain; charset="us-ascii"
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.
Senior Research Analyst
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:firstname.lastname@example.org]
Sent: Friday, October 24, 2008 2:27 PM
To: Jack Clark
Subject: Re: COMPRESS function modifier not working as expected in PROC
On 10/24/08, Jack Clark <email@example.com> wrote:
> 755 proc sql;
> 756 select compress(x,,"d") as y
> ERROR 22-322: Syntax error, expecting one of the following: a name, a
> quoted string,
Just give it what it wants.
select compress(x,' ',"d") as y
It is a bit inconsistent. But you can use the same syntax in data step.