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 (October 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 24 Oct 2008 14:19:28 -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
Comments: To: Dave Scocca <dave@scocca.org>
In-Reply-To:  <B6A80F4FF6BDA678CDB1BFF4@[10.8.2.178]>
Content-Type: text/plain; charset="us-ascii"

Dave,

You're right! Thanks for the quick answer.

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: Dave Scocca [mailto:dave@scocca.org] Sent: Friday, October 24, 2008 2:18 PM To: Jack Clark; SAS(r) Discussion Subject: Re: [SAS-L] COMPRESS function modifier not working as expected in PROC SQL

--On 10/24/2008 2:12 PM -0400 Jack Clark wrote:

> When I run it in PROC SQL, an ERROR is generated. > 754 > > 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, > > a numeric constant, a datetime constant, a missing value, > BTRIM, INPUT, LOWER, PUT, > > SUBSTRING, UPPER, USER.

It looks like the DATA step allows two consecutive commas to represent a

missing parameter, while SQL requires an explicit specification of the missing parameter between the commas (as . or ""). The following should

work:

proc sql; select compress(x,"","d") as y from test ; quit;

Dave Scocca


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