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 (September 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sun, 3 Sep 2006 15:52:56 -0700
Reply-To:   dramage <dramage1@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   dramage <dramage1@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   Re: Macro string from Proc Sql
Comments:   To: sas-l@uga.edu
In-Reply-To:   <090320062022.20533.44FB3988000DCA2C00005035220922462705029A06CE9907@comcast.net>
Content-Type:   text/plain; charset="iso-8859-1"

Thanks. I'll remember that.

Do the outside quotes remain quoted because I used the %str quoting function?

Ian Whitlock wrote: > Dramage, > > Just remember that the value looks good but it isn't. The outside > single quotes remain quoted. You need > > %unquote(&mvar) > > to use the expression in most code. On the other hand, > it might be better to standardize on double quotes around > the values. > > Ian Whitlock > =============== > Date: Thu, 31 Aug 2006 21:11:11 -0700 > Reply-To: dramage <dramage1@GMAIL.COM> > Sender: "SAS(r) Discussion" > From: dramage <dramage1@GMAIL.COM> > Organization: http://groups.google.com > Subject: Re: Macro string from Proc Sql > Comments: To: sas-l > In-Reply-To: <1157077760.020497.264170@m73g2000cwd.googlegroups.com> > Content-Type: text/plain; charset="iso-8859-1" > Try this: > data test; > input testvar $20.; > datalines; > 01234 > 43210 > 56789 > 99999 > ; > run; > proc print; run; > proc sql; > select testvar into: mvar separated by "','" > from test; > quit; > %let mvar=%str(%')&mvar%str(%'); > %put &mvar; > > auto208611@hushmail.com wrote: > > Is there a method within this Proc Sql that I can get > > the creation of a macro list to have to have a single > > quote on both sides of the comma, so that final > > macro string resluts in this string: > > > > '01234','43210','56789','99999' > > > > proc sql noprint ; > > select zipnum into :zips separated by ',' from dataset1; > > > > Thanks


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