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:17:36 -0400
Reply-To:     Dave Scocca <dave@SCOCCA.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Dave Scocca <dave@SCOCCA.ORG>
Subject:      Re: COMPRESS function modifier not working as expected in PROC SQL
Comments: To: Jack Clark <jclark@HILLTOP.UMBC.EDU>
In-Reply-To:  <456B52C41B724C41B96561D7AD283E7DEFE8E0@mail.chpdm.umbc.edu>
Content-Type: text/plain; charset=us-ascii; format=flowed

--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